Skip to content

Commit

Permalink
assert ENOENT
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed May 11, 2023
1 parent ca8dc2b commit 1b2058d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/lib/eslint/flat-eslint.js
Expand Up @@ -676,7 +676,7 @@ describe("FlatESLint", () => {
cwd: getFixturePath(""),
overrideConfigFile: "does-not-exist.js"
});
await assert.rejects(() => eslint.lintText("var foo = 'bar';"));
await assert.rejects(() => eslint.lintText("var foo = 'bar';"), { code: "ENOENT" });
});

it("should throw if non-string value is given to 'code' parameter", async () => {
Expand Down Expand Up @@ -822,7 +822,7 @@ describe("FlatESLint", () => {
cwd: getFixturePath(),
overrideConfigFile: "does-not-exist.js"
});
await assert.rejects(() => eslint.lintFiles("undef*.js"));
await assert.rejects(() => eslint.lintFiles("undef*.js"), { code: "ENOENT" });
});

it("should throw an error when given a config file and a valid file and invalid parser", async () => {
Expand Down

0 comments on commit 1b2058d

Please sign in to comment.