1
0
mirror of synced 2025-11-06 04:30:40 +08:00

added test

This commit is contained in:
Jamie Peabody
2018-05-09 21:10:04 +01:00
parent bde295febd
commit 3ee7b77186
4 changed files with 151 additions and 8 deletions

62
karma.conf.js Normal file
View File

@@ -0,0 +1,62 @@
const path = require('path');
const webpackCfg = require('./webpack.config');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = function(config) {
config.set({
basePath: './',
browsers: [
'ChromeHeadless'
],
frameworks: [
'mocha', 'chai'
],
files: [
'node_modules/codemirror/lib/codemirror.css',
'src/mergely.css',
'tests/**/*.spec.js'
],
preprocessors: {
'node_modules/jquery/dist/jquery.js': ['webpack'],
'node_modules/codemirror/lib/codemirror.js': ['webpack'],
'tests/**/*.spec.js': ['webpack'],
'src/**/*.js': ['webpack']
},
reporters: ['mocha'],
mochaReporter: {
showDiff: true
},
singleRun: true,
client: {
captureConsole: true,
mocha: {}
},
webpack: {
entry: './src/mergely.js',
module: {
loaders: [
{ test: /\.css$/, loader: ExtractTextPlugin.extract('css-loader') }
]
},
resolve: {
extensions: ['.js'],
alias: {
CodeMirror: path.join(__dirname, 'node_modules', 'codemirror'),
jQuery: path.join(__dirname, 'node_modules', 'jquery')
}
},
plugins: [
new ExtractTextPlugin('mergely.css')
]
},
webpackServer: {
noInfo: true
}
});
}