Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Build: fix test failure on Node 11 (#11100)" #11375

Merged
merged 1 commit into from Feb 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 2 additions & 9 deletions tests/lib/util/npm-utils.js
Expand Up @@ -162,15 +162,8 @@ describe("npmUtils", () => {
});

it("should return false if package.json does not exist", () => {

/*
* Checking local file system directly, which does not
* contains package.json. This is necessary because mock-fs
* doesn't work in Node.js 11: it throws an error when
* a file is missing rather than returning false.
* TODO: Find a replacement for mock-fs that works in Node 11.
*/
assert.strictEqual(npmUtils.checkPackageJson("/"), false);
mockFs({});
assert.strictEqual(npmUtils.checkPackageJson(), false);
});
});

Expand Down