<commit_before>// tests
//
// 1. Request local user data
// 2. If not found initiate OAuth2 process

"use strict";

var fluid = fluid || require("infusion");
var gpii  = fluid.registerNamespace("gpii");

fluid.setLogging(true);

require("./includes.js");

fluid.registerNamespace("gpii.oauth.tests.router.testEnvironment");

fluid.defaults("gpii.oauth.tests.router.testEnvironment", {
    gradeNames: ["fluid.test.testEnvironment", "autoInit"],
    port: 8080,
    baseUrl: "http://localhost:8080/",
    events: {
        constructServer: null,
        onStarted: null
    },
    components: {
        oauthServer:{
            createOnEvent: "constructServer",
            type: "gpii.oauth",
            options: {
                events: {
                    onStarted: "{testEnvironment}.events.onStarted"
                },
                config: {
                    express: {
                        port: "{testEnvironment}.options.port",
                        baseUrl: "{testEnvironment}.options.baseUrl"
                    }
                }
            }
        },
        testCaseHolder: {
            type: "gpii.oauth.tests.router.caseHolder"
        }
    }
});

gpii.oauth.tests.router.testEnvironment();<commit_msg>NOJIRA:  Removed `autoInit` now that we are working with Fluid 2.0<commit_after>// tests
//
// 1. Request local user data
// 2. If not found initiate OAuth2 process

"use strict";

var fluid = fluid || require("infusion");
var gpii  = fluid.registerNamespace("gpii");

fluid.setLogging(true);

require("./includes.js");

fluid.registerNamespace("gpii.oauth.tests.router.testEnvironment");

fluid.defaults("gpii.oauth.tests.router.testEnvironment", {
    gradeNames: ["fluid.test.testEnvironment"],
    port: 8080,
    baseUrl: "http://localhost:8080/",
    events: {
        constructServer: null,
        onStarted: null
    },
    components: {
        oauthServer:{
            createOnEvent: "constructServer",
            type: "gpii.oauth",
            options: {
                events: {
                    onStarted: "{testEnvironment}.events.onStarted"
                },
                config: {
                    express: {
                        port: "{testEnvironment}.options.port",
                        baseUrl: "{testEnvironment}.options.baseUrl"
                    }
                }
            }
        },
        testCaseHolder: {
            type: "gpii.oauth.tests.router.caseHolder"
        }
    }
});

gpii.oauth.tests.router.testEnvironment();
{'fraction_non_alphanumeric': 0.12960760998810938, 'fraction_numerical': 0.009512485136741973, 'mean_word_length': 1.8169642857142858, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1953990', 'n_tokens_mistral': 756, 'n_tokens_neox': 710, 'n_words': 126}