-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #34584 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
- Loading branch information
Showing
7 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
const common = require('../common'); | ||
const { Worker } = require('worker_threads'); | ||
const assert = require('assert'); | ||
|
||
new Worker(new URL('data:text/javascript,')) | ||
.on('error', common.mustNotCall(() => {})); | ||
new Worker(new URL('data:text/javascript,export{}')) | ||
.on('error', common.mustNotCall(() => {})); | ||
|
||
new Worker(new URL('data:text/plain,')) | ||
.on('error', common.mustCall(() => {})); | ||
new Worker(new URL('data:text/javascript,module.exports={}')) | ||
.on('error', common.mustCall(() => {})); | ||
|
||
new Worker(new URL('data:text/javascript,await Promise.resolve()')) | ||
.on('error', common.mustNotCall(() => {})); | ||
new Worker(new URL('data:text/javascript,await Promise.reject()')) | ||
.on('error', common.mustCall(() => {})); | ||
new Worker(new URL('data:text/javascript,await new Promise(()=>{})')) | ||
.on( | ||
'exit', | ||
common.mustCall((exitCode) => { assert.strictEqual(exitCode, 13); }) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters