<commit_before>/*jslint browser: true, devel: true, node: true, nomen: true */
/*globals define, angular, describe, expect, it */

/**
 * Test with 2 main objectives:
 * 1. Make sure that ngAMD's cache provider works
 * 2. Make sure that independent angular.modules can be incorporated in the project
 *    by using the ngAMD.processQueue() method to load these modules.
 */
define(['regServices'], function (app) {
    'use strict';
    describe('Utest Registered Services', function () {
        //console.log("Running serviceSpec.js");
        var results = app.__utest_regserv_result,
            inject = app.ngAMD.inject;

        it(".reg_constant check.", function () {
            inject(function (reg_constant_name) {
                expect(reg_constant_name).toBe(results.reg_constant_name);
            });
        });

        it(".factory check.", function () {
            inject(function (UtestRegFactory) {
                // Testing for out of order dependency.  constant_name should be defined after UtestRegFactory
                expect(UtestRegFactory.name).toBe(results.factory_name);
                expect(UtestRegFactory.const_name).toBe(results.reg_constant_name);
            });
        });
        
        it(".reg_value check.", function () {
            inject(function (reg_value_name) {
                expect(reg_value_name).toBe(results.reg_value_name);
            });
        });

        it(".service check.", function () {
            inject(function (UtestRegService) {
                // Testing for out of order dependency.  constant_name should be defined after UtestRegFactory
                expect(UtestRegService.name).toBe(results.service_name);
                expect(UtestRegService.val_name).toBe(results.reg_value_name);
            });
        });
        
        it(".directive check.", function () {
            inject(function ($rootScope, $compile) {
                var scope = $rootScope.$new(),
                    elm = angular.element("<div utest-reg-directive=''></div>");
                $compile(elm)(scope);
                expect(elm.text()).toBe(results.directive_name);
            });
        });
        
        it(".filter check.", function () {
            inject(function ($filter) {
                var ufilter = $filter('utestRegFilter');
                expect(ufilter).toBeDefined();
                expect(ufilter("hello")).toBe("hello " + results.reg_filter_name);
            });
        });

        
    });
});
<commit_msg>Update the old comment copied from servicesSpec to reflect what the new code does<commit_after>/*jslint browser: true, devel: true, node: true, nomen: true */
/*globals define, angular, describe, expect, it */

/**
 * Test to ensure that services can be created using app.register method.
 */
define(['regServices'], function (app) {
    'use strict';
    describe('Utest Registered Services', function () {
        //console.log("Running serviceSpec.js");
        var results = app.__utest_regserv_result,
            inject = app.ngAMD.inject;

        it(".reg_constant check.", function () {
            inject(function (reg_constant_name) {
                expect(reg_constant_name).toBe(results.reg_constant_name);
            });
        });

        it(".factory check.", function () {
            inject(function (UtestRegFactory) {
                // Testing for out of order dependency.  constant_name should be defined after UtestRegFactory
                expect(UtestRegFactory.name).toBe(results.factory_name);
                expect(UtestRegFactory.const_name).toBe(results.reg_constant_name);
            });
        });
        
        it(".reg_value check.", function () {
            inject(function (reg_value_name) {
                expect(reg_value_name).toBe(results.reg_value_name);
            });
        });

        it(".service check.", function () {
            inject(function (UtestRegService) {
                // Testing for out of order dependency.  constant_name should be defined after UtestRegFactory
                expect(UtestRegService.name).toBe(results.service_name);
                expect(UtestRegService.val_name).toBe(results.reg_value_name);
            });
        });
        
        it(".directive check.", function () {
            inject(function ($rootScope, $compile) {
                var scope = $rootScope.$new(),
                    elm = angular.element("<div utest-reg-directive=''></div>");
                $compile(elm)(scope);
                expect(elm.text()).toBe(results.directive_name);
            });
        });
        
        it(".filter check.", function () {
            inject(function ($filter) {
                var ufilter = $filter('utestRegFilter');
                expect(ufilter).toBeDefined();
                expect(ufilter("hello")).toBe("hello " + results.reg_filter_name);
            });
        });

        
    });
});

{'fraction_non_alphanumeric': 0.12702922077922077, 'fraction_numerical': 0.0006087662337662338, 'mean_word_length': 2.0073215375228797, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '3194335', 'n_tokens_mistral': 1303, 'n_tokens_neox': 1250, 'n_words': 270}