-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: fix winapi_strerror error string
- Loading branch information
1 parent
008fb5f
commit 57dbbf8
Showing
2 changed files
with
29 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
const assert = require('assert'); | ||
const child = require('child_process'); | ||
|
||
if (!common.isWindows) { | ||
common.skip('This test is specific to Windows to test winapi_strerror'); | ||
} | ||
|
||
// Ref: https://github.com/nodejs/node/issues/23191 | ||
// This test is specific to Windows. | ||
|
||
const cp = child.spawn('pwd'); | ||
|
||
cp.on('exit', common.mustCall(function() { | ||
try { | ||
process._debugProcess(cp.pid); | ||
} catch (error) { | ||
assert.strictEqual(error.message, 'The system cannot find the file specified.'); | ||
} | ||
})); |