0.0.2 • Published 8 years ago

karma-global-preprocessor v0.0.2

Weekly downloads
464
License
MIT
Repository
github
Last release
8 years ago

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!