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

doc: set exit code in custom test runner example #51056

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/api/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,9 @@
import path from 'node:path';

run({ files: [path.resolve('./tests/test.js')] })
.on('test:fail', () => {
process.exitCode = 1

Check failure on line 1158 in doc/api/test.md

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Expected indentation of 3 spaces but found 4

Check failure on line 1158 in doc/api/test.md

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Missing semicolon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
process.exitCode = 1
process.exitCode = 1;

})

Check failure on line 1159 in doc/api/test.md

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Expected indentation of 1 space but found 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
process.exitCode = 1
})
process.exitCode = 1;
})

.compose(tap)
.pipe(process.stdout);
```
Expand All @@ -1164,6 +1167,9 @@
const path = require('node:path');

run({ files: [path.resolve('./tests/test.js')] })
.on('test:fail', () => {
process.exitCode = 1

Check failure on line 1171 in doc/api/test.md

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Missing semicolon
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
process.exitCode = 1
process.exitCode = 1;

})
.compose(tap)
.pipe(process.stdout);
```
Expand Down
Loading