pocesar/grunt-mocha-istanbul

Allow to pass --hook-run-in-context

Closed this issue · 3 comments

if (options.hookRunInContext) {
    args.push('--hook-run-in-context');
}

See gotwarlost/istanbul#23

you can do this using istanbulOptions (any extra istanbul options that are not provided by the plugin), like this:

mocha_istanbul: {
  main: {
     options: {
        istanbulOptions: ['--hook-run-in-context']
     }
  }
}

Yes, it helped. Funny thing is that if (options.istanbulOptions && options.istanbulOptions.length) { is right there where I had put my hotfix and I haven't noticed it. Thanks for quick reply.

np 👍