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

Example for running the test runner manually is broken #49488

Closed
mcollina opened this issue Sep 4, 2023 · 2 comments · Fixed by #49489
Closed

Example for running the test runner manually is broken #49488

mcollina opened this issue Sep 4, 2023 · 2 comments · Fixed by #49489
Labels
good first issue Issues that are suitable for first-time contributors. test_runner Issues and PRs related to the test runner subsystem.

Comments

@mcollina
Copy link
Member

mcollina commented Sep 4, 2023

The current example:

import { tap } from 'node:test/reporters';
import process from 'node:process';

run({ files: [path.resolve('./tests/test.js')] })
  .compose(tap)
  .pipe(process.stdout);

Does not run because it's missing a few imports:

  • run
  • path
@MoLow MoLow added good first issue Issues that are suitable for first-time contributors. test_runner Issues and PRs related to the test runner subsystem. labels Sep 4, 2023
@MoLow
Copy link
Member

MoLow commented Sep 4, 2023

added the good first issue Issues that are suitable for first-time contributors. label. PRS fixing the documentation are welcome

@OshriAsulin
Copy link
Contributor

OshriAsulin commented Sep 4, 2023

@MoLow
I have submitted two pull requests (PRs) to address and resolve this issue.
#49489 and #49490

nodejs-github-bot pushed a commit that referenced this issue Sep 6, 2023
The script was missing necessary imports for the `run`
function and the `path` module, causing it to fail.
This commit adds the missing imports and resolves the issue.

- Import `run` from the appropriate module.
- Import `path` to resolve file paths.

The script should now run without errors.

PR-URL: #49489
Fixes: #49488
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
ruyadorno pushed a commit that referenced this issue Sep 28, 2023
The script was missing necessary imports for the `run`
function and the `path` module, causing it to fail.
This commit adds the missing imports and resolves the issue.

- Import `run` from the appropriate module.
- Import `path` to resolve file paths.

The script should now run without errors.

PR-URL: #49489
Fixes: #49488
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
alexfernandez pushed a commit to alexfernandez/node that referenced this issue Nov 1, 2023
The script was missing necessary imports for the `run`
function and the `path` module, causing it to fail.
This commit adds the missing imports and resolves the issue.

- Import `run` from the appropriate module.
- Import `path` to resolve file paths.

The script should now run without errors.

PR-URL: nodejs#49489
Fixes: nodejs#49488
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues that are suitable for first-time contributors. test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants