currently the only problem is that phantomjs is unable to parse the js files fix test exec on travis envcodeql
parent
75b9cc60df
commit
d3901cc286
@ -1,2 +1,2 @@ |
|||||||
./node_modules/.bin/jshint js/*.js test/unit/*.js |
npm run lint |
||||||
npm test |
npm test |
||||||
|
@ -1,53 +1,72 @@ |
|||||||
|
const webpackConfig = require('../webpack.config'); |
||||||
|
|
||||||
module.exports = function (config) { |
module.exports = function (config) { |
||||||
config.set({ |
config.set({ |
||||||
|
|
||||||
basePath: '../', |
basePath: '../', |
||||||
|
|
||||||
files: [ |
files: [ |
||||||
'bower_components/angular/angular.js', |
|
||||||
'bower_components/angular-route/angular-route.js', |
|
||||||
'bower_components/angular-mocks/angular-mocks.js', |
|
||||||
'bower_components/angular-sanitize/angular-sanitize.js', |
|
||||||
'bower_components/angular-touch/angular-touch.js', |
|
||||||
'bower_components/underscore/underscore.js', |
|
||||||
'node_modules/linkifyjs/dist/linkify.js', |
'node_modules/linkifyjs/dist/linkify.js', |
||||||
'node_modules/linkifyjs/dist/linkify-string.js', |
'node_modules/linkifyjs/dist/linkify-string.js', |
||||||
'src/js/localstorage.js', |
'test/unit/main.test.js' |
||||||
'src/js/weechat.js', |
|
||||||
'src/js/irc-utils.js', |
|
||||||
'src/js/glowingbear.js', |
|
||||||
'src/js/utils.js', |
|
||||||
'src/js/notifications.js', |
|
||||||
'src/js/filters.js', |
|
||||||
'src/js/handlers.js', |
|
||||||
'src/js/connection.js', |
|
||||||
'src/js/inputbar.js', |
|
||||||
'src/js/plugin-directive.js', |
|
||||||
'src/js/websockets.js', |
|
||||||
'src/js/models.js', |
|
||||||
'src/js/bufferResume.js', |
|
||||||
'src/js/plugins.js', |
|
||||||
'test/unit/**/*.js' |
|
||||||
], |
], |
||||||
|
|
||||||
autoWatch: true, |
autoWatch: true, |
||||||
|
|
||||||
frameworks: ['jasmine'], |
frameworks: ['jasmine'], |
||||||
|
|
||||||
browsers : ['PhantomJS'], |
browsers: ['Chrome', 'ChromeHeadless', 'ChromeHeadlessNoSandbox'], |
||||||
|
|
||||||
singleRun: true, |
singleRun: true, |
||||||
|
|
||||||
plugins: [ |
plugins: [ |
||||||
'karma-phantomjs-launcher', |
'karma-phantomjs-launcher', |
||||||
'karma-jasmine', |
'karma-jasmine', |
||||||
'karma-junit-reporter' |
'karma-junit-reporter', |
||||||
|
'karma-webpack' |
||||||
], |
], |
||||||
|
|
||||||
|
customLaunchers: { |
||||||
|
ChromeHeadlessNoSandbox: { |
||||||
|
base: 'ChromeHeadless', |
||||||
|
flags: ['--no-sandbox', '--disable-setuid-sandbox'] |
||||||
|
} |
||||||
|
|
||||||
|
}, |
||||||
|
|
||||||
junitReporter: { |
junitReporter: { |
||||||
outputFile: 'test_out/unit.xml', |
outputFile: 'test_out/unit.xml', |
||||||
suite: 'unit' |
suite: 'unit' |
||||||
} |
}, |
||||||
|
|
||||||
|
/* karma-webpack config |
||||||
|
pass your webpack configuration for karma |
||||||
|
add `babel-loader` to the webpack configuration to make
|
||||||
|
the ES6+ code in the test files readable to the browser
|
||||||
|
eg. import, export keywords */ |
||||||
|
webpack: { |
||||||
|
devtool: webpackConfig.devtool, |
||||||
|
module: webpackConfig.module, |
||||||
|
optimization: { |
||||||
|
runtimeChunk: false, |
||||||
|
splitChunks: false |
||||||
|
}, |
||||||
|
}, |
||||||
|
|
||||||
|
preprocessors: { |
||||||
|
//add webpack as preprocessor to support require() in test-suits .js files
|
||||||
|
'./test/unit/*.js': ['webpack'], |
||||||
|
'./src/**/*.js': ['webpack'] |
||||||
|
}, |
||||||
|
// webpackMiddleware: {
|
||||||
|
// //turn off webpack bash output when run the tests
|
||||||
|
// noInfo: true,
|
||||||
|
// stats: 'errors-only'
|
||||||
|
// }
|
||||||
|
|
||||||
}); |
}); |
||||||
|
|
||||||
|
if(process.env.TRAVIS){ |
||||||
|
config.browsers = ['ChromeHeadlessNoSandbox']; |
||||||
|
} |
||||||
}; |
}; |
||||||
|
@ -0,0 +1,3 @@ |
|||||||
|
|
||||||
|
import "./filters"; |
||||||
|
import "./plugins"; |
Loading…
Reference in new issue