diff --git a/.github/workflows/hardhat-tests.yml b/.github/workflows/hardhat-tests.yml index ed6028336d..8092418cdb 100644 --- a/.github/workflows/hardhat-tests.yml +++ b/.github/workflows/hardhat-tests.yml @@ -64,7 +64,7 @@ jobs: shell: bash run: | source <(cargo llvm-cov show-env --export-prefix) - pnpm -C hardhat-tests test:ci + pnpm -C hardhat-tests test # `--release` included to match `build:dev` compilation flags cargo llvm-cov report --release --locked --codecov --output-path codecov.json diff --git a/hardhat-tests/integration/.gitignore b/hardhat-tests/integration/.gitignore deleted file mode 100644 index 47f2cb0c83..0000000000 --- a/hardhat-tests/integration/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules/ -artifacts/ -cache/ diff --git a/hardhat-tests/integration/smock/contracts/FooBar.sol b/hardhat-tests/integration/smock/contracts/FooBar.sol deleted file mode 100644 index 16a195a069..0000000000 --- a/hardhat-tests/integration/smock/contracts/FooBar.sol +++ /dev/null @@ -1,12 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity ^0.8.24; - -contract Foo { - function f() public {} -} - -contract Bar { - function callFoo(Foo foo) public { - foo.f(); - } -} diff --git a/hardhat-tests/integration/smock/hardhat.config.js b/hardhat-tests/integration/smock/hardhat.config.js deleted file mode 100644 index d9d9afc3b6..0000000000 --- a/hardhat-tests/integration/smock/hardhat.config.js +++ /dev/null @@ -1,6 +0,0 @@ -require("@nomiclabs/hardhat-ethers"); - -/** @type import('hardhat/config').HardhatUserConfig */ -module.exports = { - solidity: "0.8.24", -}; diff --git a/hardhat-tests/integration/smock/package.json b/hardhat-tests/integration/smock/package.json deleted file mode 100644 index 695f966b42..0000000000 --- a/hardhat-tests/integration/smock/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "hardhat-edr-smock-test", - "version": "1.0.0", - "devDependencies": { - "@defi-wonderland/smock": "2.4.0", - "@nomiclabs/hardhat-ethers": "^2.2.3", - "@types/node": "^20.0.0", - "chai": "^4.3.6", - "ethers": "5.7.2", - "hardhat": "2.26.1", - "mocha": "^10.0.0" - }, - "keywords": [], - "license": "MIT", - "main": "index.js", - "private": true -} diff --git a/hardhat-tests/integration/smock/test/test.js b/hardhat-tests/integration/smock/test/test.js deleted file mode 100644 index 1e07cbb549..0000000000 --- a/hardhat-tests/integration/smock/test/test.js +++ /dev/null @@ -1,18 +0,0 @@ -const { smock } = require("@defi-wonderland/smock"); -const { assert } = require("chai"); -const chaiAsPromised = require("chai-as-promised"); - -describe("HH+EDR and smock", function () { - // Ported from https://github.com/fvictorio/edr-smock-issue - it("set call override callback for smock", async function () { - // Hardhat doesn't work with ESM modules, so we have to require it here. - // The pretest hook runs compile. - const { ethers } = require("hardhat"); - - const mockedFoo = await smock.fake("Foo"); - const Bar = await ethers.getContractFactory("Bar"); - const bar = await Bar.deploy(); - - await bar.callFoo(mockedFoo.address); - }); -}); diff --git a/hardhat-tests/package.json b/hardhat-tests/package.json index 10e9e97e7f..9189df7cb9 100644 --- a/hardhat-tests/package.json +++ b/hardhat-tests/package.json @@ -61,8 +61,6 @@ "lint:fix": "pnpm prettier --write && pnpm eslint --fix", "pretest": "cd .. && pnpm build:dev", "prettier": "prettier --check \"**/*.{js,ts,md,json}\"", - "test": "mocha --recursive \"test/**/*.ts\"", - "test:ci": "pnpm test && pnpm test:integration", - "test:integration": "bash run-integration-tests.sh" + "test": "mocha --recursive \"test/**/*.ts\"" } } diff --git a/hardhat-tests/run-integration-tests.sh b/hardhat-tests/run-integration-tests.sh deleted file mode 100755 index 3ae97d04bb..0000000000 --- a/hardhat-tests/run-integration-tests.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -e - -(cd .. && pnpm build) - -cd integration -for i in *; do - if [ -d "$i" ]; then - echo "Running integration test: '$i'" - cd $i - pnpm hardhat test - cd .. - fi -done