Closed beckyconning closed 9 years ago
no way around this. proxyquire in node works totally different than in the browser. you could try to use the browser field to build a wrapper around them that will use the right one depending on where your tests run.
oh ok. i thought that might be the case. i'm sure there are lots of differences between proxyquireify and proxyquire but it still feels like a shame as there is a large usable intersection of shared behaviour (my tests work fine apart from this). thanks for the quick reply.
Anyone else looking for this functionality might want to try this https://github.com/bendrucker/proxyquire-universal.
You can use it with karma-bro by adding this to your karma configuration.
browserify: { debug: true, plugin: ['proxyquire-universal'] }
when i use
my tests work fine in the browser but all fail (implementation seems to do nothing) in node
when i use
the tests work in node but the browser fails with
i'm using proxyquireify as a browserify plugin and am almost definitely missing something obvious. any support would be great thank you!