Skip to content

Commit

Permalink
Add Karma.js tests runner for Chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
artyomtrityak committed Aug 30, 2017
1 parent 53e2176 commit 69ce2d9
Show file tree
Hide file tree
Showing 14 changed files with 78 additions and 16,208 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.DS_Store
/node_modules
dist/tests
File renamed without changes.
69 changes: 69 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Karma configuration
// Generated on Tue Aug 29 2017 19:00:38 GMT-0700 (PDT)

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: [
'dist/tests/functional.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: {
},


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


// 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: ['Chrome'],


// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,

// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity
})
}
5,217 changes: 0 additions & 5,217 deletions package-lock.json

This file was deleted.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"bundle": "rollup -c scripts/rollup.bundle.config.js",
"standalone": "rollup -c scripts/rollup.standalone.config.js",
"bundle-minify": "rollup -c scripts/rollup.bundle.min.config.js",
"tests": "rollup -c scripts/rollup.tests.config.js --format es"
"test": "rollup -c scripts/rollup.tests.config.js --format es && karma start karma.conf.js"
},
"author": "atomiks",
"license": "MIT",
Expand All @@ -22,7 +22,13 @@
"babel-preset-es2015": "^6.24.1",
"babel-preset-es2015-rollup": "^3.0.0",
"cssnano": "^3.10.0",
"jasmine": "^2.8.0",
"karma": "^1.7.0",
"karma-chrome-launcher": "^2.2.0",
"karma-jasmine": "^1.1.0",
"mocha": "^3.5.0",
"postcss": "^5.2.16",
"rollup": "^0.47.6",
"rollup-plugin-babel": "^2.7.1",
"rollup-plugin-babili": "^3.1.0",
"rollup-plugin-commonjs": "^8.0.2",
Expand Down
2 changes: 1 addition & 1 deletion scripts/rollup.tests.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import commonjs from 'rollup-plugin-commonjs'

export default {
entry: './tests/spec/functional.js',
dest: './tests/functional.js',
dest: './dist/tests/functional.js',
external: ['Popper'],
plugins: [
babel({
Expand Down
18 changes: 0 additions & 18 deletions tests/SpecRunner.html

This file was deleted.

Loading

0 comments on commit 69ce2d9

Please sign in to comment.