node/test/parallel/test-delayed-require.js
Bryan English 324c82b1c9
test: use common.fixturesDir almost everywhere
Updating tests to use `common.fixturesDir` whenever possible/reasonable.
Left out things like tests for `path` and `require.resolve`.

PR-URL: https://github.com/nodejs/node/pull/6997
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-01-31 20:04:31 -05:00

11 lines
322 B
JavaScript

'use strict';
var common = require('../common');
var path = require('path');
var assert = require('assert');
setTimeout(common.mustCall(function() {
const a = require(path.join(common.fixturesDir, 'a'));
assert.strictEqual(true, 'A' in a);
assert.strictEqual('A', a.A());
assert.strictEqual('D', a.D());
}), 50);