<commit_before>// Load modules
var Lab = require('lab');
var Hapi = require('hapi');

// Test shortcuts
var lab = exports.lab = Lab.script();
var expect = Lab.expect;
var beforeEach = lab.beforeEach;
var experiment = lab.experiment;
var test = lab.test;


experiment('Stimpy-medium', function () {
    
    test('loads certain plugins from config on a server with some options.', function (done) {
        
        // Server Config
        var config = require('../server/config');
        
        // Create a server with a host, port, and options
        var server = Hapi.createServer(config.host, config.port, config.hapi.options);
        
        // Hapi Server Plugins
        var plugins = require('../server/config/plugins');;
        
        server.pack.register(plugins, function(err) {
                
                expect(err).to.not.exist;
                
                // Glean the names of the plugins that were included.                
                var pluginNames = Object.keys(server._registrations);
                
                expect(pluginNames).to.have.members(['dogwater',
                                                     'good',
                                                     'hapi-named-routes',
                                                     'hapi-cache-buster',
                                                     'hapi-assets']);
                
                done();
            }
            
        );
    });
    
});<commit_msg>working on testing<commit_after>// Load modules
var Lab = require('lab');
var Hapi = require('hapi');

// Test shortcuts
var lab = exports.lab = Lab.script();
var expect = Lab.expect;
var beforeEach = lab.beforeEach;
var experiment = lab.experiment;
var test = lab.test;


experiment('Stimpy-medium', function () {
    
    test('loads certain plugins from config on a server with some options.', function (done) {
        
        // Server Config
        var config = require('../server/config');
        
        // Create a server with a host, port, and options
        var server = Hapi.createServer(config.host, config.port, config.hapi.options);
        
        // Hapi Server Plugins
        var plugins = require('../server/config/plugins');;
        
        server.pack.register(plugins, function(err) {
                
            expect(err).to.not.exist;
            
            // Glean the names of the plugins that were included.                
            var pluginNames = Object.keys(server._registrations);
            
            expect(pluginNames).to.have.members(['dogwater',
                                                 'good',
                                                 'hapi-named-routes',
                                                 'hapi-cache-buster',
                                                 'hapi-assets']);
            
            done();
        });
    });

    test('test index page', function (done) {
        
        // Server Config
        var config = require('../server/config');
        
        // Create a server with a host, port, and options
        var server = Hapi.createServer(config.host, config.port, config.hapi.options);
        
        server.pack.register([{ plugin: require("../index") }], function(err) {
                
            var options = {
                method: "GET",
                url: "/"
            };
         
            server.inject(options, function(response) {

                var result = response.result;
         
                Lab.expect(response.statusCode).to.equal(200);
         
                done();
            });
        });
    });
    
});
{'fraction_non_alphanumeric': 0.11183673469387755, 'fraction_numerical': 0.0008163265306122449, 'mean_word_length': 1.2442002442002442, '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': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4282202', 'n_tokens_mistral': 873, 'n_tokens_neox': 858, 'n_words': 218}