node/test/parallel/test-global.js
Rich Trott 4faaed69fa test,tools: enable linting for undefined vars
The test directory had linting for undefined variables disabled. It is
enabled everywhere else in the code base. Let's disable the fule for
individual lines in the handful of tests that use undefined variables.

PR-URL: https://github.com/nodejs/node/pull/6255
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
2016-04-20 08:38:41 -07:00

22 lines
644 B
JavaScript

/* eslint-disable strict */
var common = require('../common');
var assert = require('assert');
common.globalCheck = false;
baseFoo = 'foo'; // eslint-disable-line no-undef
global.baseBar = 'bar';
assert.equal('foo', global.baseFoo, 'x -> global.x in base level not working');
assert.equal('bar',
baseBar, // eslint-disable-line no-undef
'global.x -> x in base level not working');
var module = require('../fixtures/global/plain');
const fooBar = module.fooBar;
assert.equal('foo', fooBar.foo, 'x -> global.x in sub level not working');
assert.equal('bar', fooBar.bar, 'global.x -> x in sub level not working');