Skip to content

Commit

Permalink
test: simplify force-context-aware test
Browse files Browse the repository at this point in the history
PR-URL: #29705
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: David Carlier <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
cjihrig authored and BridgeAR committed Oct 9, 2019
1 parent cf7b405 commit 690a863
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
4 changes: 0 additions & 4 deletions test/addons/force-context-aware/index.js

This file was deleted.

13 changes: 4 additions & 9 deletions test/addons/force-context-aware/test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
// Flags: --force-context-aware
'use strict';
const common = require('../../common');
const childProcess = require('child_process');
const assert = require('assert');
const path = require('path');

const mod = path.join('test', 'addons', 'force-context-aware', 'index.js');

const execString = `"${process.execPath}" --force-context-aware ./${mod}`;
childProcess.exec(execString, common.mustCall((err) => {
const errMsg = 'Loading non context-aware native modules has been disabled';
assert.strictEqual(err.message.includes(errMsg), true);
}));
assert.throws(() => {
require(`./build/${common.buildType}/binding`);
}, /^Error: Loading non context-aware native modules has been disabled$/);

0 comments on commit 690a863

Please sign in to comment.