Skip to content

Commit

Permalink
test: refactor flag check
Browse files Browse the repository at this point in the history
Refactor test-vm-run-in-new-context so that check for `--expose-gc` flag
will not run afoul of an upcoming lint rule that checks that string
literals are not used for the `message` argument of
`assert.strictEqual()`.

Backport-PR-URL: #22888
PR-URL: #22849
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Trott authored and MylesBorins committed Sep 25, 2018
1 parent e9416d4 commit 702d67f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-vm-run-in-new-context.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const common = require('../common');
const assert = require('assert');
const vm = require('vm');

assert.strictEqual(typeof global.gc, 'function',
'Run this test with --expose-gc');
if (typeof global.gc !== 'function')
assert.fail('Run this test with --expose-gc');

common.globalCheck = false;

Expand Down

0 comments on commit 702d67f

Please sign in to comment.