Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: simplify force-context-aware test #29705

Merged
merged 1 commit into from
Sep 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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$/);