[Improvement] use ChromeHeadless instead of PhantomJS to run test cases (#913)

This commit is contained in:
neverland 2018-04-23 12:57:16 +08:00 committed by GitHub
parent 6d077f730b
commit cbdaaf4b7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 20 deletions

View File

@ -1,4 +1,7 @@
language: node_js
sudo: required
addons:
chrome: stable
node_js:
- 6
os: linux

View File

@ -73,7 +73,7 @@
"css-loader": "^0.28.11",
"dependency-tree": "^6.1.0",
"eslint": "^4.19.1",
"eslint-plugin-vue": "^4.4.0",
"eslint-plugin-vue": "^4.5.0",
"extract-text-webpack-plugin": "^4.0.0-beta.0",
"fast-vue-md-loader": "^1.0.3",
"gh-pages": "^1.0.0",
@ -87,7 +87,7 @@
"karma-phantomjs-launcher": "^1.0.4",
"karma-sinon-chai": "^1.3.4",
"karma-spec-reporter": "^0.0.32",
"karma-webpack": "2.0.13",
"karma-webpack": "3.0.0",
"lint-staged": "^7.0.4",
"mocha": "^5.1.1",
"postcss": "^6.0.21",
@ -112,7 +112,7 @@
"vue-template-compiler": "2.5.16",
"vue-template-es2015-compiler": "^1.6.0",
"webpack": "^4.6.0",
"webpack-cli": "^2.0.14",
"webpack-cli": "^2.0.15",
"webpack-dev-server": "3.1.3",
"webpack-merge": "^4.1.2"
}

View File

@ -4,12 +4,11 @@ require('babel-core/register')({
presets: [require('babel-preset-env')]
});
var getWebpackConfig = require('./get-webpack-conf');
var travis = process.env.TRAVIS;
const getWebpackConfig = require('./get-webpack-conf');
module.exports = function(config) {
config.set({
browsers: travis ? ['PhantomJS'] : ['PhantomJS', 'Chrome'],
browsers: ['ChromeHeadless'],
frameworks: ['mocha', 'sinon-chai'],
reporters: ['spec', 'coverage'],
files: ['./index.js'],

View File

@ -5056,16 +5056,16 @@ karma-spec-reporter@^0.0.32:
dependencies:
colors "^1.1.2"
karma-webpack@2.0.13:
version "2.0.13"
resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-2.0.13.tgz#cf56e3056c15b7747a0bb2140fc9a6be41dd9f02"
karma-webpack@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/karma-webpack/-/karma-webpack-3.0.0.tgz#bf009c5b73c667c11c015717e9e520f581317c44"
dependencies:
async "^2.0.0"
babel-runtime "^6.0.0"
loader-utils "^1.0.0"
lodash "^4.0.0"
source-map "^0.5.6"
webpack-dev-middleware "^1.12.0"
webpack-dev-middleware "^2.0.6"
karma@^2.0.0:
version "2.0.2"
@ -5680,7 +5680,7 @@ mime@1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
mime@^1.3.4, mime@^1.5.0:
mime@^1.3.4:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
@ -8690,10 +8690,6 @@ thunky@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371"
time-stamp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-2.0.0.tgz#95c6a44530e15ba8d6f4a3ecb8c3a3fac46da357"
timed-out@^4.0.0, timed-out@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"
@ -8964,6 +8960,10 @@ urix@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
url-join@^2.0.2:
version "2.0.5"
resolved "https://registry.yarnpkg.com/url-join/-/url-join-2.0.5.tgz#5af22f18c052a000a48d7b82c5e9c2e2feeda728"
url-join@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/url-join/-/url-join-4.0.0.tgz#4d3340e807d3773bda9991f8305acdcc2a665d2a"
@ -9302,15 +9302,17 @@ webpack-dev-middleware@3.1.2:
url-join "^4.0.0"
webpack-log "^1.0.1"
webpack-dev-middleware@^1.12.0:
version "1.12.2"
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-1.12.2.tgz#f8fc1120ce3b4fc5680ceecb43d777966b21105e"
webpack-dev-middleware@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-2.0.6.tgz#a51692801e8310844ef3e3790e1eacfe52326fd4"
dependencies:
loud-rejection "^1.6.0"
memory-fs "~0.4.1"
mime "^1.5.0"
mime "^2.1.0"
path-is-absolute "^1.0.0"
range-parser "^1.0.3"
time-stamp "^2.0.0"
url-join "^2.0.2"
webpack-log "^1.0.1"
webpack-dev-server@3.1.3:
version "3.1.3"