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

[1, undefined].forEach((value) => {
  assert.throws(
    () => v8.setFlagsFromString(value),
    {
      code: 'ERR_INVALID_ARG_TYPE',
      name: 'TypeError',
      message: 'The "flags" argument must be of type string.' +
               common.invalidArgTypeHelper(value)
    }
  );
});