diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit/index.js | 8 | ||||
| -rw-r--r-- | test/unit/karma.conf.js | 13 | ||||
| -rw-r--r-- | test/unit/specs/services/gesture_service/gesture_service.spec.js | 2 |
3 files changed, 13 insertions, 10 deletions
diff --git a/test/unit/index.js b/test/unit/index.js index 03b19e32..83a2dcdb 100644 --- a/test/unit/index.js +++ b/test/unit/index.js @@ -1,7 +1,3 @@ -// Polyfill fn.bind() for PhantomJS -/* eslint-disable no-extend-native */ -Function.prototype.bind = require('function-bind') - // require all test files (files that ends with .spec.js) const testsContext = require.context('./specs', true, /\.spec$/) testsContext.keys().forEach(testsContext) @@ -9,5 +5,5 @@ testsContext.keys().forEach(testsContext) // require all src files except main.js for coverage. // you can also change this to match only the subset of files that // you want coverage for. -const srcContext = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/) -srcContext.keys().forEach(srcContext) +// const srcContext = require.context('../../src', true, /^\.\/(?!main(\.js)?$)/) +// srcContext.keys().forEach(srcContext) diff --git a/test/unit/karma.conf.js b/test/unit/karma.conf.js index d19a2229..8465523a 100644 --- a/test/unit/karma.conf.js +++ b/test/unit/karma.conf.js @@ -13,7 +13,7 @@ var projectRoot = path.resolve(__dirname, '../../') var webpackConfig = merge(baseConfig, { // use inline sourcemap for karma-sourcemap-loader module: { - loaders: utils.styleLoaders() + rules: utils.styleLoaders() }, devtool: '#inline-source-map', // vue: { @@ -53,11 +53,18 @@ module.exports = function (config) { // 1. install corresponding karma launcher // http://karma-runner.github.io/0.13/config/browsers.html // 2. add it to the `browsers` array below. - browsers: ['PhantomJS'], + browsers: ['FirefoxHeadless'], frameworks: ['mocha', 'sinon-chai'], reporters: ['mocha'], + customLaunchers: { + 'FirefoxHeadless': { + base: 'Firefox', + flags: [ + '-headless', + ] + } + }, files: [ - '../../node_modules/@babel/polyfill/dist/polyfill.js', './index.js' ], preprocessors: { diff --git a/test/unit/specs/services/gesture_service/gesture_service.spec.js b/test/unit/specs/services/gesture_service/gesture_service.spec.js index 4a1b009a..a91f95db 100644 --- a/test/unit/specs/services/gesture_service/gesture_service.spec.js +++ b/test/unit/specs/services/gesture_service/gesture_service.spec.js @@ -9,7 +9,7 @@ const mockTouchEvent = (x, y) => ({ ] }) -describe.only('GestureService', () => { +describe('GestureService', () => { describe('swipeGesture', () => { it('calls the callback on a successful swipe', () => { let swiped = false |
