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 watch mode tests · nodejs/node@43094e2

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/sequential
    • sequential.status
    • test-watch-mode.mjs
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/sequential/sequential.status‎

Copy file name to clipboardExpand all lines: test/sequential/sequential.status
-3Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ prefix sequential
77
[true] # This section applies to all platforms
88
# https://github.com/nodejs/node/issues/27611#issuecomment-613100468
99
test-cpu-prof-dir-worker: PASS, FLAKY
10-
# https://github.com/nodejs/node/issues/44898
11-
test-watch-mode: PASS, FLAKY
12-
test-watch-mode-inspect: PASS, FLAKY
1310
# https://github.com/nodejs/node/issues/47409
1411
test-http2-large-file: PASS, FLAKY
1512

Collapse file

‎test/sequential/test-watch-mode.mjs‎

Copy file name to clipboardExpand all lines: test/sequential/test-watch-mode.mjs
+8-2Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function runInBackground({ args = [], options = {}, completed = 'Completed runni
8787
future.resolve();
8888
return { stdout, stderr };
8989
},
90-
restart(timeout = 1000) {
90+
restart(timeout = common.platformTimeout(10_000)) {
9191
if (!child) {
9292
run();
9393
}
@@ -996,6 +996,10 @@ process.on('message', (message) => {
996996
});
997997

998998
it('should strip all watch flags from NODE_OPTIONS in child process', async () => {
999+
// Avoid recursively watching the repository's source and test trees.
1000+
const cwd = tmpdir.resolve('node-options');
1001+
mkdirSync(path.join(cwd, 'src'), { recursive: true });
1002+
mkdirSync(path.join(cwd, 'test'));
9991003
const file = createTmpFile('console.log(process.env.NODE_OPTIONS);');
10001004
const nodeOptions = [
10011005
'--watch',
@@ -1012,6 +1016,7 @@ process.on('message', (message) => {
10121016
const { done, restart } = runInBackground({
10131017
args: ['--watch', file],
10141018
options: {
1019+
cwd,
10151020
env: { ...process.env, NODE_OPTIONS: nodeOptions },
10161021
},
10171022
});
@@ -1040,7 +1045,8 @@ process.on('message', (message) => {
10401045
writeFileSync(reqFile, 'globalThis.requiredOk = true;');
10411046

10421047
const file = createTmpFile('console.log("required:" + !!globalThis.requiredOk);');
1043-
const nodeOptions = `--watch --require "${reqFile}"`;
1048+
// Backslashes inside quoted NODE_OPTIONS values are escape characters.
1049+
const nodeOptions = `--watch --require "${reqFile.replaceAll(path.sep, '/')}"`;
10441050
const { done, restart } = runInBackground({
10451051
args: ['--watch', file],
10461052
options: {

0 commit comments

Comments
0 (0)
You are visitor 01402775 — 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.