Skip to content

Commit

Permalink
* updated to latest version of karma & jasmine
Browse files Browse the repository at this point in the history
* switched from PhantomJS to ChromeHeadless
  • Loading branch information
iamcal committed May 7, 2021
1 parent ecb048a commit 39896eb
Show file tree
Hide file tree
Showing 5 changed files with 2,102 additions and 106 deletions.
59 changes: 9 additions & 50 deletions karma-cover.conf.js
Original file line number Diff line number Diff line change
@@ -1,80 +1,39 @@
// 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/autolink.js',
'test/*.spec.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'
]
],
client: {
jasmine: {
random: false
}
}
})
}
53 changes: 9 additions & 44 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,67 +1,32 @@
// 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/autolink.min.js',
'test/*.spec.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',
]
],
client: {
jasmine: {
random: false
}
}
})
}
2 changes: 1 addition & 1 deletion lib/autolink.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 39896eb

Please sign in to comment.