karma-global-preprocessor

0.0.2 • Public • Published

karma-global-preprocessor

Preprocessor which makes variables globally available in your tests

Installation

npm install karma-global-preprocessor --save-dev

Configuration

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!

Package Sidebar

Install

npm i karma-global-preprocessor

Weekly Downloads

1,181

Version

0.0.2

License

MIT

Last publish

Collaborators

  • jgodi