-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: switch to
forge-std
for JS integration tests (#770)
- Loading branch information
Showing
11 changed files
with
46 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
js/integration-tests/solidity-tests/contracts/ForkCheatcode.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 5 additions & 8 deletions
13
js/integration-tests/solidity-tests/contracts/FuzzFixture.t.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 14 additions & 15 deletions
29
js/integration-tests/solidity-tests/contracts/IsolateTest.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,6 @@ | ||
import { task } from "hardhat/config"; | ||
import fs from "node:fs"; | ||
import path from "node:path"; | ||
|
||
const RUST_INTEGRATION_TEST_DATA_PATH = | ||
"../../../crates/edr_solidity_tests/tests/testdata"; | ||
|
||
// HACK: copy the libraries Rust integration tests into the Hardhat project source | ||
task("copyLibraries", "Run pre-test script", async (taskArgs, hre) => { | ||
await fs.promises.copyFile( | ||
path.join(RUST_INTEGRATION_TEST_DATA_PATH, "lib/ds-test/src/test.sol"), | ||
path.join(hre.config.paths.sources, "test.sol") | ||
); | ||
await fs.promises.copyFile( | ||
path.join(RUST_INTEGRATION_TEST_DATA_PATH, "cheats/Vm.sol"), | ||
path.join(hre.config.paths.sources, "Vm.sol") | ||
); | ||
}); | ||
|
||
task("test").setAction(async (taskArgs, hre, runSuper) => { | ||
// Run the pretest task before tests | ||
await hre.run("copyLibraries"); | ||
// Run the actual tests | ||
await runSuper(); | ||
}); | ||
|
||
export default { | ||
solidity: { version: "0.8.24", settings: { evmVersion: "cancun" } }, | ||
solidity: { | ||
version: "0.8.24", | ||
settings: { evmVersion: "cancun" }, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.