Skip to content

Commit

Permalink
Update tests, testing in browser
Browse files Browse the repository at this point in the history
  • Loading branch information
emiliorizzo committed Nov 26, 2019
1 parent 6dd00af commit 30c9493
Show file tree
Hide file tree
Showing 4 changed files with 2,142 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
working_directory: ~/tpm
docker:
- image: circleci/node:10.16.3
- image: circleci/node:10.16.3-browsers

steps:
- checkout
Expand Down
69 changes: 69 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
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: ['browserify', 'mocha'],

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

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

// preprocess matching files before serving them to the browser
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
preprocessors: {
'test/*.spec.js': ['browserify']
},
browserify: {
'transform': [
[
'babelify'
]
],
debug: true
},
// test results reporter to use
// possible values: 'dots', 'progress'
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
reporters: ['progress'],

// 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: true,

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

// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
plugins: [
'karma-browserify',
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-mocha'
],

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}
Loading

0 comments on commit 30c9493

Please sign in to comment.