<commit_before>describe("catalinker.config", function () {
    'use strict';

    beforeEach(function () {
        module('catalinker.config');
    });

    describe("ConfigService", function() {

        it("should have an config path configured", function () {
            inject(function (configPath) {
                expect(configPath).toBe('/config');
            });
        });

        it("should load ontologyUri from given configPath", function(done) {
            var $rootScope,
                $httpBackend,
                myConfigPath = '/someuri',
                myConfig = { "ontologyUri": "another_uri"};

            module(function($provide) {
                $provide.constant('configPath', myConfigPath);
            });

            inject(function ($injector) {
                $rootScope = $injector.get('$rootScope');
                $httpBackend = $injector.get('$httpBackend');
            });

            $httpBackend.expectGET(myConfigPath).respond(200, myConfig);

            inject(function(ontologyUri) {
                ontologyUri.then(function(data) {
                    expect(data).toBe("another_uri");
                    done();
                }, function(data) {
                    fail(data);
                });
            });
            $rootScope.$digest();
            $httpBackend.flush();
            $httpBackend.verifyNoOutstandingExpectation();
            $httpBackend.verifyNoOutstandingRequest();
        });

        describe("ontologyFactory", function () {

            it("should load ontology from given ontologyUri", function (done) {
                var $rootScope,
                    $httpBackend;

                module(function ($provide) {
                    $provide.factory('ontologyUri', function ($q) {
                        var def = $q.defer();
                        def.resolve('http://www.example.com/someuri');
                        return def.promise;
                    });
                });
<commit_msg>New test case for tripleStoreUri.<commit_after>describe("catalinker.config", function () {
    'use strict';

    beforeEach(function () {
        module('catalinker.config');
    });

    describe("ConfigService", function() {

        it("should have an config path configured", function () {
            inject(function (configPath) {
                expect(configPath).toBe('/config');
            });
        });

        describe("config values", function () {
            var $rootScope,
                $httpBackend,
                myConfigPath = '/someuri',
                myConfig = {
                    "ontologyUri": "another_uri",
                    "tripleStoreUri": "yet_another_uri"
                };

            beforeEach(function () {
                module(function($provide) {
                    $provide.constant('configPath', myConfigPath);
                });
            });

            beforeEach(function () {
                inject(function ($injector) {
                    $rootScope = $injector.get('$rootScope');
                    $httpBackend = $injector.get('$httpBackend');
                });
            });

            beforeEach(function () {
                $httpBackend.expectGET(myConfigPath).respond(200, myConfig);
            });

            it("should load ontologyUri", function(done) {
                inject(function(ontologyUri) {
                    ontologyUri.then(function(data) {
                        expect(data).toBe("another_uri");
                        done();
                    }, function(data) {
                        fail(data);
                    });
                });
                $rootScope.$digest();
                $httpBackend.flush();
                $httpBackend.verifyNoOutstandingExpectation();
                $httpBackend.verifyNoOutstandingRequest();
            });

            it("should load tripleStoreUri", function(done) {
                inject(function(tripleStoreUri) {
                    tripleStoreUri.then(function(data) {
                        expect(data).toBe("yet_another_uri");
                        done();
                    }, function(data) {
                        fail(data);
                    });
                });
                $rootScope.$digest();
                $httpBackend.flush();
                $httpBackend.verifyNoOutstandingExpectation();
                $httpBackend.verifyNoOutstandingRequest();
            });
        });

        describe("ontologyFactory", function () {

            it("should load ontology from given ontologyUri", function (done) {
                var $rootScope,
                    $httpBackend;

                module(function ($provide) {
                    $provide.factory('ontologyUri', function ($q) {
                        var def = $q.defer();
                        def.resolve('http://www.example.com/someuri');
                        return def.promise;
                    });
                });

{'fraction_non_alphanumeric': 0.12262452490498099, 'fraction_numerical': 0.001200240048009602, 'mean_word_length': 1.3529411764705883, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '16932', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1120, 'n_words': 179}