summaryrefslogtreecommitdiff
path: root/test/parallel/test-v8-flag-type-check.js
blob: 1dcdee928b1ec3a4c241255a31ab67b29e94c24a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict';
const common = require('../common');
const v8 = require('v8');

[1, undefined].forEach((value) => {
  common.expectsError(
    () => v8.setFlagsFromString(value),
    {
      code: 'ERR_INVALID_ARG_TYPE',
      type: TypeError,
      message: 'The "flags" argument must be of type string. ' +
               `Received type ${typeof value}`
    }
  );
});