-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,25 @@ | ||
# karma-runscript-preprocessor | ||
|
||
Runs a script on rebuild. Suitable to use on karma-webpack with a single test-loader file. The script execution can bail the test running if error happens, which is handy to run some checks even before the test run (e.g. jsxhint). | ||
|
||
# Installation | ||
|
||
`npm install karma-runscript-preprocessor --save-dev` | ||
|
||
# Configuration | ||
module.exports = function(config) { | ||
config.set({ | ||
files: [ | ||
'test-loader.js' | ||
], | ||
|
||
preprocessors: { | ||
'test-loader.js': [ 'runscript', 'webpack' ] | ||
}, | ||
runscript: { | ||
script: 'run-lint.sh', 'script, baseDir is your pwd' | ||
stopOnError: true, //on false it will not cancel the test run when script failed | ||
messageOnError: "(any message you want, even integration with CI)" | ||
} | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters