Skip to content
Snippets Groups Projects
  • Mike Pennisi's avatar
    cb617493
    Update browser runner to honor `onlyStrict` flag · cb617493
    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.
    cb617493
    History
    Update browser runner to honor `onlyStrict` flag
    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.