1
0
mirror of synced 2025-12-07 22:18:17 +08:00

Add: Karma

This commit is contained in:
surunzi
2017-08-09 23:53:49 +08:00
parent eb4d1b034c
commit b6842547d5
8 changed files with 61 additions and 16 deletions

44
karma.conf.js Normal file
View File

@@ -0,0 +1,44 @@
module.exports = function (config)
{
config.set({
basePath: '',
frameworks: ['jquery-1.8.3'],
files: [
'eruda.js',
'test/init.js',
'node_modules/jasmine-core/lib/jasmine-core/jasmine.js',
'node_modules/karma-jasmine/lib/boot.js',
'node_modules/karma-jasmine/lib/adapter.js',
'node_modules/jasmine-jquery/lib/jasmine-jquery.js',
'test/console.js',
'test/elements.js',
'test/features.js',
'test/info.js',
'test/network.js',
'test/resources.js',
'test/snippets.js',
'test/sources.js',
// 'test/settings.js'
],
plugins: [
'karma-jasmine',
'karma-jquery',
'karma-phantomjs-launcher',
'karma-wrap-preprocessor'
],
preprocessors: {
'test/*.js': ['wrap']
},
wrapPreprocessor: {
template: '(function () { <%= contents %> })()'
},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['PhantomJS'],
singleRun: true,
concurrency: Infinity
});
};