1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-13 02:52:54 -05:00
denoland-deno/tests/specs/run/top_level_await/order.js
Leo Kettmeir 42b71d82db
chore(lint): add .out file reference checker (#27078)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-11-26 20:53:20 -08:00

21 lines
483 B
JavaScript

// Ported from Node
// https://github.com/nodejs/node/blob/54746bb763ebea0dc7e99d88ff4b379bcd680964/test/es-module/test-esm-tla.mjs
const { default: order } = await import("./tla/parent.js");
console.log("order", JSON.stringify(order));
if (
!(
order[0] === "order" &&
order[1] === "b" &&
order[2] === "c" &&
order[3] === "d" &&
order[4] === "a" &&
order[5] === "parent"
)
) {
throw new Error("TLA wrong order");
}
console.log("TLA order correct");