karma-global-preprocessor
v0.0.2
Published
A Karma plugin to set globally defined variables for your tests.
Maintainers
Readme
karma-global-preprocessor
Preprocessor which makes variables globally available in your tests
Installation
npm install karma-global-preprocessor --save-devConfiguration
module.exports = function (config) {
config.set({
...
// Set globally available variables
globals: {
'MY_VAR': 123
},
...
});
};Using
Now, you will be able to use the variable via window.globals.MY_VAR and it will be 123!
