Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
17 lines
No EOL
548 B
JavaScript
17 lines
No EOL
548 B
JavaScript
'use strict';
|
|
var common = require('../common');
|
|
var assert = require('assert');
|
|
var module = require('module');
|
|
|
|
var a = require(common.fixturesDir + '/module-require/relative/dot.js');
|
|
var b = require(common.fixturesDir + '/module-require/relative/dot-slash.js');
|
|
|
|
assert.equal(a.value, 42);
|
|
assert.equal(a, b, 'require(".") should resolve like require("./")');
|
|
|
|
process.env.NODE_PATH = common.fixturesDir + '/module-require/relative';
|
|
module._initPaths();
|
|
|
|
var c = require('.');
|
|
|
|
assert.equal(c.value, 42, 'require(".") should honor NODE_PATH'); |