summaryrefslogtreecommitdiff
path: root/tests/013_dynamic_import.ts
blob: 0812623f688e1bd01b28a8d2f437aac57d7a33cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
(async () => {
  const {
    returnsHi,
    returnsFoo2,
    printHello3
  } = await import("./subdir/mod1.ts");

  printHello3();

  if (returnsHi() !== "Hi") {
    throw Error("Unexpected");
  }

  if (returnsFoo2() !== "Foo") {
    throw Error("Unexpected");
  }
})();