diff --git a/test/proxy_spec.js b/test/proxy_spec.js index 50fe3df0..1b6a59b9 100644 --- a/test/proxy_spec.js +++ b/test/proxy_spec.js @@ -216,7 +216,9 @@ describe("Proxy Tests", function() { }; expect(() => { const cp = new ConfigurableProxy(options); - }).toThrow(new Error("Cannot find module 'mybackend'")); + }).toThrowMatching(function(thrown) { + return thrown.message.includes("Cannot find module"); + }); done(); });