We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5f26a5b + 6b68734 commit ea16594Copy full SHA for ea16594
v-next/hardhat-test-utils/src/global.ts
@@ -0,0 +1,16 @@
1
+import { after, before } from "node:test";
2
+
3
+export function doNotUseFetch(): void {
4
+ let originalFetch: typeof global.fetch;
5
6
+ before(async () => {
7
+ originalFetch = global.fetch;
8
+ global.fetch = async () => {
9
+ throw new Error("Network requests are disabled");
10
+ };
11
+ });
12
13
+ after(async () => {
14
+ global.fetch = originalFetch;
15
16
+}
v-next/hardhat-test-utils/src/index.ts
@@ -1,3 +1,4 @@
export * from "./fixture-projects.js";
-export * from "./hardhat-error.js";
export * from "./fs.js";
+export * from "./global.js";
+export * from "./hardhat-error.js";
0 commit comments