Skip to content

Commit

Permalink
switch from PhantomJS to ChromeHeadless
Browse files Browse the repository at this point in the history
  • Loading branch information
iamcal committed May 7, 2021
1 parent b515328 commit cbaf24e
Show file tree
Hide file tree
Showing 4 changed files with 1,158 additions and 3,193 deletions.
52 changes: 3 additions & 49 deletions karma-cover.conf.js
Original file line number Diff line number Diff line change
@@ -1,79 +1,33 @@
// Karma configuration
// Generated on Wed Jun 24 2015 19:44:32 GMT-0700 (PDT)
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function(config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],


// list of files / patterns to load in the browser
files: [
'test/preamble.js',
'lib/ease.js',
'test/*.js'
],


// list of files to exclude
exclude: [
],


// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor

preprocessors: {
"lib/*.js": "coverage"
},

coverageReporter: {
type: "lcov",
dir: "coverage/"
},


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['coverage'],


// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_DISABLE,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
browsers: ['ChromeHeadless'],
singleRun: false,

plugins: [
'karma-jasmine',
'karma-phantomjs-launcher',
'karma-chrome-launcher',
'karma-coverage'
]
})
Expand Down
46 changes: 3 additions & 43 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,66 +1,26 @@
// Karma configuration
// Generated on Wed Jun 24 2015 19:44:32 GMT-0700 (PDT)
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function(config) {
config.set({

// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',


// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],


// list of files / patterns to load in the browser
files: [
'test/preamble.js',
'lib/ease.min.js',
'test/*.js'
],


// list of files to exclude
exclude: [
],


// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['story'],


// web server port
port: 9876,


// enable / disable colors in the output (reporters and logs)
colors: true,


// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,


// enable / disable watching file and executing tests whenever any file changes
autoWatch: false,


// start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['PhantomJS'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
browsers: ['ChromeHeadless'],
singleRun: false,

plugins: [
'karma-jasmine',
'karma-phantomjs-launcher',
'karma-chrome-launcher',
'karma-story-reporter',
]
})
Expand Down

0 comments on commit cbaf24e

Please sign in to comment.