Manually fix issues that eslint --fix couldn't do automatically. Backport-PR-URL: https://github.com/nodejs/node/pull/11775 PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
23 lines
490 B
JavaScript
23 lines
490 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const assert = require('assert');
|
|
|
|
{
|
|
const relativePath = '../fixtures/semicolon';
|
|
const absolutePath = require.resolve(relativePath);
|
|
const fakeModule = {};
|
|
|
|
require.cache[absolutePath] = {exports: fakeModule};
|
|
|
|
assert.strictEqual(require(relativePath), fakeModule);
|
|
}
|
|
|
|
|
|
{
|
|
const relativePath = 'fs';
|
|
const fakeModule = {};
|
|
|
|
require.cache[relativePath] = {exports: fakeModule};
|
|
|
|
assert.strictEqual(require(relativePath), fakeModule);
|
|
}
|