node/test/parallel/test-v8-flag-type-check.js
James M Snell 64168eb9b4 v8: migrate setFlagsFromString to internal/errors
PR-URL: https://github.com/nodejs/node/pull/16535
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2017-10-29 17:04:27 -07:00

15 lines
312 B
JavaScript

'use strict';
const common = require('../common');
const v8 = require('v8');
[ 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'
}
);
});