mirror of https://github.com/nodejs/node.git
test: improvements in test fixtures symlinked
- using strictEqual instead equal - common dependency should be the first one - using path.join instead relative path PR-URL: https://github.com/nodejs/node/pull/10182 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com>pull/10257/head
parent
34991be450
commit
e467d37ed9
|
@ -1,13 +1,13 @@
|
|||
'use strict';
|
||||
const assert = require('assert');
|
||||
const common = require('../../common');
|
||||
const assert = require('assert');
|
||||
const foo = require('./foo');
|
||||
const path = require('path');
|
||||
|
||||
const linkScriptTarget = path.join(common.fixturesDir,
|
||||
'/module-require-symlink/symlinked.js');
|
||||
'module-require-symlink', 'symlinked.js');
|
||||
|
||||
var foo = require('./foo');
|
||||
assert.equal(foo.dep1.bar.version, 'CORRECT_VERSION');
|
||||
assert.equal(foo.dep2.bar.version, 'CORRECT_VERSION');
|
||||
assert.equal(__filename, linkScriptTarget);
|
||||
assert.strictEqual(foo.dep1.bar.version, 'CORRECT_VERSION');
|
||||
assert.strictEqual(foo.dep2.bar.version, 'CORRECT_VERSION');
|
||||
assert.strictEqual(__filename, linkScriptTarget);
|
||||
assert(__filename in require.cache);
|
||||
|
|
Loading…
Reference in New Issue