File tree 2 files changed +15
-1
lines changed
v-next/hardhat/src/internal/builtin-plugins/solidity-test
2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " hardhat " : patch
3
+ ---
4
+
5
+ Use default value for rpcCachePath when running solidity tests
Original file line number Diff line number Diff line change @@ -2,6 +2,8 @@ import type { HardhatUserConfig } from "../../../config.js";
2
2
import type { HardhatConfig } from "../../../types/config.js" ;
3
3
import type { HardhatUserConfigValidationError } from "../../../types/hooks.js" ;
4
4
5
+ import path from "node:path" ;
6
+
5
7
import { isObject } from "@nomicfoundation/hardhat-utils/lang" ;
6
8
import { resolveFromRoot } from "@nomicfoundation/hardhat-utils/path" ;
7
9
import {
@@ -121,6 +123,13 @@ export async function resolveSolidityTestUserConfig(
121
123
testsPath = typeof testsPath === "object" ? testsPath . solidity : testsPath ;
122
124
testsPath ??= "test" ;
123
125
126
+ const defaultRpcCachePath = path . join ( resolvedConfig . paths . cache , "edr" ) ;
127
+
128
+ const solidityTest = {
129
+ rpcCachePath : defaultRpcCachePath ,
130
+ ...userConfig . solidityTest ,
131
+ } ;
132
+
124
133
return {
125
134
...resolvedConfig ,
126
135
paths : {
@@ -130,6 +139,6 @@ export async function resolveSolidityTestUserConfig(
130
139
solidity : resolveFromRoot ( resolvedConfig . paths . root , testsPath ) ,
131
140
} ,
132
141
} ,
133
- solidityTest : userConfig . solidityTest ?? { } ,
142
+ solidityTest,
134
143
} ;
135
144
}
You can’t perform that action at this time.
0 commit comments