node/deps/v8/test/mjsunit/harmony/async-module-ordinal-reset/skip-run.mjs
Michaël Zasso 9d7cd9b864
deps: update V8 to 12.8.374.13
PR-URL: https://github.com/nodejs/node/pull/54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2024-08-16 16:03:01 +02:00

26 lines
816 B
JavaScript

// Copyright 2024 Nathan Whitaker. All rights reserved. MIT license.
export default async () => {
// depends on `skip-common.mjs` which contains a TLA
const a = import("./skip-a.mjs");
// this resolves, resetting the async ordinal counter
await import("./skip-imports-async-module.mjs");
// start evaluating more modules that depend on `skip-common.mjs`.
// one of these will receive a duplicate ordinal to
// `skip-a.mjs`
await Promise.all([
a,
import("./skip-b.mjs"),
import("./skip-c.mjs"),
import("./skip-d.mjs"),
import("./skip-e.mjs"),
import("./skip-f.mjs"),
]);
// when `common.mjs` settles, we go to update the state
// of the modules waiting on it. Due to the duplicate
// ordinal, one of the modules will be skipped and
// be stuck pending forever.
};