thlorenz/proxyquire

Unable to run it with Karma

Opened this issue · 1 comments

Hello,

When I run my test through karma I get the following error, running it with just jasmine it's fine. Is there specific settings for it in karma for proxyrequire?

TypeError: proxyquire is not a function
at
at UserContext.beforeEach (/var/folders/5w/rflxm6z54kl6bjwkf0z7cl8r0000gn/T/3d2194b4e9ce64940188886c80746ca1.browserify.js:65583:14)
at

module.exports = function (config) { config.set({ basePath: '', frameworks: ['jasmine', 'browserify'], files: [ 'src/**/**/*.spec.js' ], exclude: [ 'node_module/**/*.js' ], preprocessors: { '**/*.spec.js': ['browserify'] }, plugins: ['karma-browserify', 'karma-jasmine', 'karma-chrome-launcher'], reporters: ['progress'], port: 9876, colors: true, logLevel: config.LOG_INFO, autoWatch: true, browsers: ['Chrome'], singleRun: false, concurrency: Infinity })

proxyquire is a node-specific package. For browserify, check out https://github.com/thlorenz/proxyquireify which has a mostly compatible API.