Skip to content

Commit

Permalink
chore: use headless 🗡 😑 chrome instead of phantomjs
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed Sep 21, 2017
1 parent d304047 commit 869daaa
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 173 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
- secure: apiavCfCQngL9Een1m7MIXMf3bqO3rY4YY59TMBl/yFKi80CEsHPHhgVUkl6hC+aM5PeBt/vgjh37rHMX31j/pcSZ4Z8SO/4Bwr36iHfhSxSEuAQog8P07qWqH7wYYWGIVmF682stgl0fYF+GN92sx/6edFVzsWVECf2G7imtICKSTbhKGm3Dhn2JwGnhD7eyfgZ33omgiaswumdu0xABoXDfqSZR+16fC4Ap5rhv3fXO9ndvRNy1STn376nT+my6e86UrQL4aS/S+HNHgIe1BUs+5cOp6Jgw6t0ie7phY0EAiECsRxy9K4e3Dctv9m6+Wma4+vy65MS0zGyrqey6oyV4l827sCOjrD1qcqc9bX6FlMSouVoNfE4ZjINNAbgigTaiLSoDSPcf5I5smkkM2ezzFOMSZwZxNdaNL2LKb97vc8m/ZUkv0sKZyT7oqVL7aJweEivsSHj5l2KR8Z7XrVB1y2eI6GvyTSa/d+CL4dSRzjh8+IRN047YBrdTKD5IkdT0upfoBu14WPUfFmLKxX+iMCslXRWb6kwojhrWNYmZvL65KRAzJ6+eIPDG/W5QUOpYyYT77bLlBQjVo6NmVvl9v3HMECq9CHH0ivKFBGPiKMOx7cJkTax3FuyznOW2WCXB9kTb5Zk9toaiNlSp9L6ll/h2Eyxa6n6sWUgmmM=
addons:
sauce_connect: true
chrome: stable
cache: yarn
before_install: if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
before_deploy:
Expand Down
30 changes: 16 additions & 14 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,51 +1,53 @@
module.exports = function (config) {
module.exports = function(config) {
const testWebpackConfig = require('./build/webpack.test.js');
const travis = process.env.TRAVIS;

config.set({
frameworks: ['phantomjs-shim', 'jasmine', 'sinon', 'should'],
frameworks: ['jasmine', 'sinon', 'should'],
preprocessors: {
'./tests/spec-bundle.js': ['coverage', 'webpack', 'sourcemap']
'./tests/spec-bundle.js': ['coverage', 'webpack', 'sourcemap'],
},

coverageReporter: {
type: 'in-memory'
type: 'in-memory',
},

remapCoverageReporter: {
'text-summary': null,
'text-lcov': './coverage/lcov.info',
'html': './coverage/html'
html: './coverage/html',
},
webpack: testWebpackConfig,
webpackMiddleware: {
stats: 'errors-only',
state: true
state: true,
},
client: {
chai: {
truncateThreshold: 0
}
truncateThreshold: 0,
},
},
files: [
{ pattern: './tests/spec-bundle.js', watched: false },
{ pattern: 'tests/schemas/**/*.json', included: false },
{ pattern: 'tests/schemas/**/*.yml', included: false },
{ pattern: 'lib/**/*.html', included: false },
{ pattern: 'lib/**/*.css', included: false }
{ pattern: 'lib/**/*.css', included: false },
],

proxies: {
'/tests/schemas': '/base/tests/schemas',
'/lib/': '/base/lib/',
'/node_modules/': '/base/node_modules/'
'/node_modules/': '/base/node_modules/',
},
colors: true,
singleRun: true,
reporters: travis ? ['mocha', 'coverage', 'remap-coverage', 'coveralls'] : ['mocha', 'coverage', 'remap-coverage'],
reporters: travis
? ['mocha', 'coverage', 'remap-coverage', 'coveralls']
: ['mocha', 'coverage', 'remap-coverage'],

browsers: ['PhantomJS'],
browsers: ['ChromeHeadless'],

browserNoActivityTimeout: 60000
browserNoActivityTimeout: 60000,
});
}
};
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@
"karma-coveralls": "^1.1.2",
"karma-jasmine": "^1.0.2",
"karma-mocha-reporter": "^2.2.4",
"karma-phantomjs-launcher": "^1.0.4",
"karma-phantomjs-shim": "^1.1.2",
"karma-remap-coverage": "^0.1.4",
"karma-should": "^1.0.0",
"karma-sinon": "^1.0.4",
Expand Down Expand Up @@ -136,7 +134,6 @@
"mark.js": "github:julmot/mark.js",
"openapi-sampler": "^0.4.3",
"perfect-scrollbar": "^0.8.1",
"phantomjs-prebuilt": "^2.1.15",
"prismjs": "^1.8.1",
"remarkable": "1.7.1",
"scrollparent": "^2.0.1",
Expand Down
Loading

0 comments on commit 869daaa

Please sign in to comment.