-
Mike Pennisi authored
Unlike the console runner, the browser runner does not modify the strictness of tests prior to running them. Regardless of a given test's metadata, it runs every test exactly once, and it never enables strict mode. This means that tests intended to function in strict mode must declare the "use strict"; directive prologue in addition to the `onlyStrict` flag. For any test that specifies the `onlyStrict` metadata flag, transform the source code by injecting a "use strict" directive prologue prior to running the test.
Mike Pennisi authoredUnlike the console runner, the browser runner does not modify the strictness of tests prior to running them. Regardless of a given test's metadata, it runs every test exactly once, and it never enables strict mode. This means that tests intended to function in strict mode must declare the "use strict"; directive prologue in addition to the `onlyStrict` flag. For any test that specifies the `onlyStrict` metadata flag, transform the source code by injecting a "use strict" directive prologue prior to running the test.