blob: 257cce4ec01b71385f7e656e366d7109af3cfd97 (
plain) (
blame)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
 | // Since top-level await is Special, we run these checks in the top-level scope as well.
try {
  require("this-package-should-not-exist");
} catch (exception) {}
try {
  await import("this-package-should-not-exist");
} catch (exception) {}
import("this-package-should-not-exist").then(
  () => {},
  () => {},
);
export async function test() {
  // none of these should error
  try {
    require("this-package-should-not-exist");
  } catch (exception) {}
  try {
    await import("this-package-should-not-exist");
  } catch (exception) {}
  import("this-package-should-not-exist").then(
    () => {},
    () => {},
  );
  return testDone(import.meta.url);
}
 |