0

I have the below configuration in the karma config file.

frameworks: [
        'jasmine',
        'requirejs'
    ],  

files: [

        //App Bower components
        {pattern: 'public/bower_components/**/*', included: false}
          .....

    // list of files / patterns to exclude
    exclude: [
        'public/bower_components/**/spec/**/*',
        'public/bower_components/**/*spec*.js'
    ],

with this while running karma, i am getting the below error:

Running "karma:runner" (karma) task
WARN [watcher]: { [Error: EMFILE, readdir '/test-application/public/bower_components/requirejs/tests/commonjs/tests/modules/1.0/absolute/b.js']
errno: 20,
code: 'EMFILE',
path: '/test-application/public/bower_components/requirejs/tests/commonjs/tests/modules/1.0/absolute/b.js' }
Error: EMFILE, readdir '/test-application/public/bower_components/requirejs/tests/commonjs/tests/modules/1.0/absolute/b.js'


Fatal error: Cannot read property 'length' of undefined

I tried to add 'public/bower_components/requirejs/tests//*.js' & 'public/bower_components//tests/**/*.js' in the exclude section but i still get the same error.

Any idea on how to get this working.

Priyabrat Nanda
  • 1,095
  • 3
  • 18
  • 34

1 Answers1

0

The fix for the above seems to be not with karma but with the OSX. I had to do the below

ulimit -n 2560

in my bash_profile to get this to work.

Priyabrat Nanda
  • 1,095
  • 3
  • 18
  • 34