feat: added automated tests to test our code in the browser by dcrescim · Pull Request #218 · javascriptdata/scikit.js · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
10 changes: 10 additions & 0 deletions esbuild.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
let esbuild = require('esbuild')
esbuild
.build({
entryPoints: ['src/index.test.ts'],
bundle: true,
platform: 'browser',
format: 'iife',
outfile: 'out.js'
})
.catch(() => process.exit(1))
19 changes: 19 additions & 0 deletions karma.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = function (config) {
config.set({
plugins: ['karma-webpack', 'karma-jasmine', 'karma-chrome-launcher'],

// 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
// Here I'm including all of the the Jest tests which are all under the __tests__ directory.
// You may need to tweak this pattern to find your test files/
files: ['./karma-setup.js', 'out.js'],
browsers: ['ChromeHeadless'],
singleRun: true
})
}
14 changes: 14 additions & 0 deletions karma.setup.js
Loading