Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to prevent Karma from removing a file?

Tags:

karma-runner

Karma works perfect with Notepad++. When I use Visual Studio as my text editor it removes the file it is supposed to watch after I save the file. This is the output from Karma showing the error:

enter image description here

This is the ticket that is being presented as the solution but it doesn't fix anything.

Is there any way to setup the config file so that it still uses autoWatch (tests on every save) but doesn't remove the file if I use Visual Studio?

I've tried

  • running the command prompt as admin

  • setting autoWatchBatchDelay, in the config file, to a large number (2500)

This is my current config file:

module.exports = function (config) {
    config.set({

        files: [
            'e2e.js'
        ],

        autoWatch: true,

        browsers: ['IE', 'Chrome'],

        frameworks: ['jasmine'],

        autoWatch: true,

        plugins: [
                'karma-ie-launcher',
                'karma-chrome-launcher',
                'karma-jasmine'
        ]
    });
}
like image 820
user1873073 Avatar asked Jan 14 '14 22:01

user1873073


1 Answers

The only way that I have made this work is by watching a folder instead of a file.

In files, watch '*.js' instead of 'e2e.js'.

like image 167
aaron Avatar answered Nov 17 '22 19:11

aaron