proxyquire-plugin injects an IIFE at the start of scripts that require("proxyquire").
- the injected IIFE is inserted before any
"use strict" statement in the script,
invalidating strict-mode.
- to work around this behaviour, the script can for example be encapsulated
in a strict-mode function, e.g. an IIFE or a describe block.
please check this repository for a demonstration of this issue, based on the differing interpretation of "this" in an unbound function.