Changed unit test env to PhantomJS

This commit is contained in:
euvl
2017-08-23 11:21:13 +01:00
parent 9f25307e30
commit 7dc7f5a303
3 changed files with 17 additions and 37 deletions

View File

@@ -8,14 +8,10 @@ jobs:
steps: steps:
- checkout - checkout
# - run:
# name: update-npm
# command: 'sudo npm install -g npm@latest'
- restore_cache: - restore_cache:
keys: keys:
- v1-dependencies-{{ checksum "package.json" }} - v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies- - v1-dependencies-
- run: - run:
@@ -23,20 +19,9 @@ jobs:
command: npm install command: npm install
- run: - run:
name: 'globals' name: globals
command: sudo npm install karma -g command: sudo npm install karma -g
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
test:
docker:
- image: circleci/node:7.10
steps:
- checkout
- run: - run:
name: test name: test
command: npm run unit command: npm run unit
@@ -45,14 +30,7 @@ jobs:
path: test-results.xml path: test-results.xml
prefix: tests prefix: tests
workflows: - save_cache:
version: 2 paths:
build_and_test: - node_modules
jobs: key: v1-dependencies-{{ checksum "package.json" }}
- build
- test:
requires:
- build
filters:
branches:
only: master

View File

@@ -21,7 +21,7 @@
"build:client": "webpack --config ./build/webpack.client.config.js --progress --hide-modules", "build:client": "webpack --config ./build/webpack.client.config.js --progress --hide-modules",
"build:server": "webpack --config ./build/webpack.server.config.js --progress --hide-modules", "build:server": "webpack --config ./build/webpack.server.config.js --progress --hide-modules",
"lint": "eslint --ext .js,.vue src test/unit/specs", "lint": "eslint --ext .js,.vue src test/unit/specs",
"unit": "karma start test/unit/karma.conf.js", "unit": "./node_modules/karma/bin/karma start test/unit/karma.conf.js",
"build": "npm run lint && npm run unit && npm run build:client && npm run build:server" "build": "npm run lint && npm run unit && npm run build:client && npm run build:server"
}, },
"license": "MIT", "license": "MIT",
@@ -32,6 +32,13 @@
"chai": "^3.5.0", "chai": "^3.5.0",
"cross-env": "^3.0.0", "cross-env": "^3.0.0",
"css-loader": "^0.25.0", "css-loader": "^0.25.0",
"eslint": "^3.19.0",
"eslint-config-standard": "^6.2.1",
"eslint-friendly-formatter": "^2.0.7",
"eslint-loader": "^1.7.1",
"eslint-plugin-html": "^2.0.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"file-loader": "^0.9.0", "file-loader": "^0.9.0",
"jasmine-core": "^2.7.0", "jasmine-core": "^2.7.0",
"karma": "^1.4.1", "karma": "^1.4.1",
@@ -44,13 +51,6 @@
"karma-sourcemap-loader": "^0.3.7", "karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.31", "karma-spec-reporter": "0.0.31",
"karma-webpack": "^2.0.2", "karma-webpack": "^2.0.2",
"eslint": "^3.19.0",
"eslint-config-standard": "^6.2.1",
"eslint-friendly-formatter": "^2.0.7",
"eslint-loader": "^1.7.1",
"eslint-plugin-html": "^2.0.0",
"eslint-plugin-promise": "^3.4.0",
"eslint-plugin-standard": "^2.0.1",
"lolex": "^1.5.2", "lolex": "^1.5.2",
"mocha": "^3.2.0", "mocha": "^3.2.0",
"node-sass": "^4.5.0", "node-sass": "^4.5.0",

View File

@@ -10,7 +10,8 @@ module.exports = function(config) {
'./tests.webpack.js' './tests.webpack.js'
], ],
browsers: [ browsers: [
'Chrome' // 'Chrome',
'PhantomJS'
], ],
preprocessors: { preprocessors: {
'./tests.webpack.js': ['webpack', 'sourcemap'] './tests.webpack.js': ['webpack', 'sourcemap']
@@ -18,7 +19,8 @@ module.exports = function(config) {
reporters: ['spec'], reporters: ['spec'],
plugins: [ plugins: [
// Launchers // Launchers
'karma-chrome-launcher', // 'karma-chrome-launcher',
'karma-phantomjs-launcher',
// Test Libraries // Test Libraries
'karma-mocha', 'karma-mocha',