Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The “appends positional arguments” test for node --run fails with error: “The input did not match the regular expression” #56477

Open
Jayman2000 opened this issue Jan 5, 2025 · 0 comments

Comments

@Jayman2000
Copy link

Version

v24.0.0-pre (built from Git commit 221040b)

Platform

Linux Jason-Desktop-Linux-VM-NixOS-Throw-Away 6.6.68 #1-NixOS SMP PREEMPT_DYNAMIC Fri Dec 27 12:58:58 UTC 2024 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

  1. Follow the instructions listed here to build Node.js from source.

  2. Change directory into the root of the node repo by running this command:

    cd <path-to-node-repo>
    
  3. Try to run the SQLite extensions test by running this command:

    out/Release/node ./test/parallel/test-node-run.js
    

How often does it reproduce? Is there a required condition?

It always reproduces. I don’t know of any required conditions.

What is the expected behavior? Why is that the expected behavior?

The test completes successfully and exits with status 0. This is expected because this is one of the tests that you’re supposed to run before submitting a Node.js pull request.

What do you see instead?

The test prints this…

▶ node --run [command]
  ✔ returns error on non-existent file (10.213379ms)
  ✔ runs a valid command (14.585716ms)
  ✔ adds node_modules/.bin to path (19.325788ms)
  ✔ chdirs into package directory (11.446652ms)
  ✔ includes actionable info when possible (59.197221ms)
  ✖ appends positional arguments (14.770615ms)
    AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Arguments: '--help "hello world test" A B C'/. Input:
    
    ''
    
        at TestContext. (/home/jayman/Documents/Home/VC/space_afraid/Git/not_mine/node/repo/test/parallel/test-node-run.js:152:14)
        at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
        at async Test.run (node:internal/test_runner/test:916:9)
        at async Suite.processPendingSubtests (node:internal/test_runner/test:613:7) {
      generatedMessage: true,
      code: 'ERR_ASSERTION',
      actual: '',
      expected: /Arguments: '--help "hello world test" A B C'/,
      operator: 'match'
    }

  ✔ should set PATH environment variable with paths appended with node_modules/.bin (19.477486ms)
  ✔ should set special environment variables (16.066446ms)
  ✔ will search parent directories for a package.json file (20.159004ms)
  ✔ returns error on unparsable file (8.828793ms)
  ✔ returns error when there is no "scripts" field file (8.318076ms)
✖ node --run [command] (205.904422ms)
ℹ tests 11
ℹ suites 1
ℹ pass 10
ℹ fail 1
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 210.083834

✖ failing tests:

test at test/parallel/test-node-run.js:143:3
✖ appends positional arguments (14.770615ms)
  AssertionError [ERR_ASSERTION]: The input did not match the regular expression /Arguments: '--help "hello world test" A B C'/. Input:
  
  ''
  
      at TestContext. (/home/jayman/Documents/Home/VC/space_afraid/Git/not_mine/node/repo/test/parallel/test-node-run.js:152:14)
      at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
      at async Test.run (node:internal/test_runner/test:916:9)
      at async Suite.processPendingSubtests (node:internal/test_runner/test:613:7) {
    generatedMessage: true,
    code: 'ERR_ASSERTION',
    actual: '',
    expected: /Arguments: '--help "hello world test" A B C'/,
    operator: 'match'
  }

…and exits with status 1.

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant