-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v8: migrate setFlagsFromString to internal/errors
PR-URL: #16535 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
- Loading branch information
Showing
4 changed files
with
22 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
'use strict'; | ||
require('../common'); | ||
const assert = require('assert'); | ||
const common = require('../common'); | ||
const v8 = require('v8'); | ||
|
||
assert.throws(function() { v8.setFlagsFromString(1); }, | ||
/^TypeError: v8 flag must be a string$/); | ||
assert.throws(function() { v8.setFlagsFromString(); }, | ||
/^TypeError: v8 flag is required$/); | ||
[ 1, undefined ].forEach((i) => { | ||
common.expectsError( | ||
() => v8.setFlagsFromString(i), | ||
{ | ||
code: 'ERR_INVALID_ARG_TYPE', | ||
type: TypeError, | ||
message: 'The "flags" argument must be of type string' | ||
} | ||
); | ||
}); |