Skip to content

Commit

Permalink
unit tests for undefined constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
fasttime committed Aug 7, 2023
1 parent 37fc6da commit 0345ac4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/lib/rules/no-new-wrappers.js
Expand Up @@ -40,6 +40,16 @@ ruleTester.run("no-new-wrappers", rule, {
} else {
var Boolean = CustomBoolean;
}
`,
{
code: "new String()",
globals: {
String: "off"
}
},
`
/* global Boolean:off */
assert(new Boolean);
`
],
invalid: [
Expand Down

0 comments on commit 0345ac4

Please sign in to comment.