diff options
Diffstat (limited to 'integration/snippets')
-rw-r--r-- | integration/snippets/array-args-with-default-values.js | 28 | ||||
-rw-r--r-- | integration/snippets/package-json-exports/index.js | 4 |
2 files changed, 31 insertions, 1 deletions
diff --git a/integration/snippets/array-args-with-default-values.js b/integration/snippets/array-args-with-default-values.js new file mode 100644 index 000000000..f733a1bfa --- /dev/null +++ b/integration/snippets/array-args-with-default-values.js @@ -0,0 +1,28 @@ +var lines; +const data = () => + lines.map(([a = null, b = null, c = null, d = null]) => ({ + a, + b, + c, + d, + })); + +export function test() { + let ran = false; + lines = [ + [undefined, undefined, undefined, undefined], + [undefined, undefined, undefined, undefined], + [undefined, undefined, undefined, undefined], + [undefined, undefined, undefined, undefined], + ]; + + for (let foo of data()) { + console.assert(foo.a === null); + console.assert(foo.b === null); + console.assert(foo.c === null); + console.assert(foo.d === null); + ran = true; + } + console.assert(ran); + testDone(import.meta.url); +} diff --git a/integration/snippets/package-json-exports/index.js b/integration/snippets/package-json-exports/index.js index 7603e0d59..7573e431c 100644 --- a/integration/snippets/package-json-exports/index.js +++ b/integration/snippets/package-json-exports/index.js @@ -2,9 +2,11 @@ import * as InexactRoot from "inexact"; import * as InexactFile from "inexact/file"; import * as ExactFile from "inexact/foo"; -export function test() { +export async function test() { console.assert(InexactRoot.target === "browser"); console.assert(InexactFile.target === "browser"); console.assert(ExactFile.target === "browser"); + + console.assert(failed); return testDone(import.meta.url); } |