Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert "Build: fix test failure on Node 11 (#11100)" (#11375)
This reverts commit 709190f.
  • Loading branch information
aladdin-add authored and nzakas committed Feb 12, 2019
1 parent 1e56897 commit 1309dfd
Showing 1 changed file with 2 additions and 9 deletions.
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

0 comments on commit 1309dfd

Please sign in to comment.