Skip to content

Commit ceb9c58

Browse files
committed
Rename file for naming convention & remove unnecessary tests
1 parent bfdb8e2 commit ceb9c58

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

v-next/hardhat/src/internal/builtin-plugins/run/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const hardhatPlugin: HardhatPlugin = {
1414
name: "noCompile",
1515
description: "Don't compile before running this task",
1616
})
17-
.setAction(import.meta.resolve("./runScriptWithHardhat.js"))
17+
.setAction(import.meta.resolve("./task-action.js"))
1818
.build(),
1919
],
2020
};

v-next/hardhat/test/internal/builtin-plugins/run/runScriptWIthHardhat.ts renamed to v-next/hardhat/test/internal/builtin-plugins/run/task-action.ts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { HardhatError } from "@ignored/hardhat-vnext-errors";
66
import { assertRejectsWithHardhatError } from "@nomicfoundation/hardhat-test-utils";
77

88
import { createHardhatRuntimeEnvironment } from "../../../../src/hre.js";
9-
import runScriptWithHardhat from "../../../../src/internal/builtin-plugins/run/runScriptWithHardhat.js";
9+
import runScriptWithHardhat from "../../../../src/internal/builtin-plugins/run/task-action.js";
1010
import { useFixtureProject } from "../../../helpers/project.js";
1111

1212
describe("runScriptWithHardhat", function () {
@@ -16,26 +16,6 @@ describe("runScriptWithHardhat", function () {
1616
hre = await createHardhatRuntimeEnvironment({});
1717
});
1818

19-
it("should throw if script is not a string", async function () {
20-
await assertRejectsWithHardhatError(
21-
runScriptWithHardhat({ script: 123, noCompile: false }, hre),
22-
HardhatError.ERRORS.INTERNAL.ASSERTION_ERROR,
23-
{
24-
message: "Expected script to be a string",
25-
},
26-
);
27-
});
28-
29-
it("should throw if noCompile is not a boolean", async function () {
30-
await assertRejectsWithHardhatError(
31-
runScriptWithHardhat({ script: "script.js", noCompile: 123 }, hre),
32-
HardhatError.ERRORS.INTERNAL.ASSERTION_ERROR,
33-
{
34-
message: "Expected noCompile to be a boolean",
35-
},
36-
);
37-
});
38-
3919
describe("javascript", function () {
4020
useFixtureProject("run-js-script");
4121

0 commit comments

Comments
 (0)