-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Bradley Farias <[email protected]> Reviewed-By: Jan Krems <[email protected]>
- Loading branch information
1 parent
90abdd3
commit b73943e
Showing
7 changed files
with
60 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