Skip to content

Commit

Permalink
use expectHardhatError instead of assert.throw
Browse files Browse the repository at this point in the history
  • Loading branch information
zoeyTM committed Oct 25, 2021
1 parent 12963b2 commit ee295b7
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { TASK_TEST_GET_TEST_FILES } from "../../../src/builtin-tasks/task-names"
import { resetHardhatContext } from "../../../src/internal/reset";
import { useEnvironment } from "../../helpers/environment";
import { useFixtureProject } from "../../helpers/project";
import { HardhatError } from "../../../src/internal/core/errors";
import { expectHardhatError } from "../../helpers/errors";
import { ERRORS } from "../../../src/internal/core/errors-list";

describe("Typescript support", function () {
describe("strict typescript config", function () {
Expand Down Expand Up @@ -73,9 +74,9 @@ describe("tsconfig param", function () {
});

it("should fail to load hardhat", function () {
assert.throws(
expectHardhatError(
() => require("../../../src/internal/lib/hardhat-lib"),
HardhatError
ERRORS.ARGUMENTS.INVALID_ENV_VAR_VALUE
);
});
});
Expand Down

0 comments on commit ee295b7

Please sign in to comment.