GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: deflake `test-loaders-workers-spawned` · nodejs/node@317e447

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/es-module
    • test-loaders-workers-spawned.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/es-module/test-loaders-workers-spawned.mjs‎

Copy file name to clipboardExpand all lines: test/es-module/test-loaders-workers-spawned.mjs
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,14 @@ describe('Worker threads do not spawn infinitely', { concurrency: true }, () =>
4848
]);
4949

5050
assert.strictEqual(stderr, '');
51+
// We are validating that:
52+
// 1. the `--require` flag is run first from the main thread (and A is printed).
53+
// 2. the `--require` flag is then run on the loader thread (and A is printed).
54+
// 3. the `--loader` module is executed (and B is printed).
55+
// 4. the `--import` module is evaluated once, on the main thread (and C is printed).
56+
// 5. the user code is finally executed (and D is printed).
5157
// The worker code should always run before the --import, but the console.log might arrive late.
52-
assert.match(stdout, /^A\r?\nA\r?\n(B\r?\nC|C\r?\nB)\r?\nD\r?\n$/);
58+
assert.match(stdout, /^A\r?\n(A\r?\nB\r?\nC|A\r?\nC\r?\nB|C\r?\nA\r?\nB)\r?\nD\r?\n$/);
5359
assert.strictEqual(code, 0);
5460
assert.strictEqual(signal, null);
5561
});

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.