<commit_before>// http 服务器
var httpServer = function (req, res, next) {
    if (req.url.indexOf('/api/test/upload/ok') > -1) {

        res.end(JSON.stringify({
            code: 200
        }));

    } else {
        next();
    }
};

var files = [
    {
        pattern: 'lib/**/*.js',
        included: false
    },
    {
        pattern: 'src/**/*',
        included: false
    },
    {
        pattern: 'test/**/*.js',
        included: false
    },
    'lib/requirejs/config.js',
    // 加载初始化视图测试
    'karma.conf.require.js'
];

if (process.argv.slice(-1)[0].match(/--test\=(.*)$/)) {
    files[2].pattern = 'test/' + RegExp.$1;
}

// Karma configuration
// Generated on Sun Jan 24 2016 23:22:35 GMT+0800 (CST)
module.exports = function (config) {
    config.set({
        // base path that will be used to resolve all patterns (eg. files, exclude)
        basePath: '',
        // frameworks to use
        // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
        frameworks: [
            'jasmine',
            'requirejs'
        ],
        // list of files / patterns to load in the browser
        files: files,<commit_msg>update: 添加测试提示<commit_after>// http 服务器
var httpServer = function (req, res, next) {
    if (req.url.indexOf('/api/test/upload/ok') > -1) {

        res.end(JSON.stringify({
            code: 200
        }));

    } else {
        next();
    }
};

var files = [
    {
        pattern: 'lib/**/*.js',
        included: false
    },
    {
        pattern: 'src/**/*',
        included: false
    },
    {
        pattern: 'test/**/*.js',
        included: false
    },
    'lib/requirejs/config.js',
    // 加载初始化视图测试
    'karma.conf.require.js'
];

if (process.argv.slice(-1)[0].match(/--test\=(.*)$/)) {
    files[2].pattern = 'test/' + RegExp.$1;
    console.log([
        '============',
        '开始测试：' + files[2].pattern,
        '============'
    ].join('\n'));
}

// Karma configuration
// Generated on Sun Jan 24 2016 23:22:35 GMT+0800 (CST)
module.exports = function (config) {
    config.set({
        // base path that will be used to resolve all patterns (eg. files, exclude)
        basePath: '',
        // frameworks to use
        // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
        frameworks: [
            'jasmine',
            'requirejs'
        ],
        // list of files / patterns to load in the browser
        files: files,
{'fraction_non_alphanumeric': 0.1780878128846943, 'fraction_numerical': 0.020106688551497744, 'mean_word_length': 1.7673098751418843, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '5343903', 'n_tokens_mistral': 842, 'n_tokens_neox': 807, 'n_words': 180}