Skip to content

Commit

Permalink
Move hardhat to peerDependencies (#59)
Browse files Browse the repository at this point in the history
* Move hardhat to peerDependencies

* Add hardhat to devDependecies

* Add no-compile flag to hardhat test commands

Co-authored-by: Antun Badurina <[email protected]>
  • Loading branch information
badurinantun and badurinantun authored Feb 18, 2022
1 parent 957958c commit bfe2e76
Show file tree
Hide file tree
Showing 10 changed files with 796 additions and 180 deletions.
954 changes: 783 additions & 171 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
"glob": "^7.2.0",
"hardhat": "^2.8.2"
},
"peerDependencies": {
"hardhat": "^2.8.2"
},
"devDependencies": {
"@types/chai": "^4.3.0",
"@types/glob": "^7.2.0",
Expand All @@ -44,6 +47,7 @@
"@typescript-eslint/parser": "^5.8.1",
"chai": "^4.3.4",
"eslint": "^8.5.0",
"hardhat": "^2.8.2",
"mocha": "^9.1.3",
"prettier": "^2.5.1",
"ts-node": "^10.4.0",
Expand Down
4 changes: 2 additions & 2 deletions test/configuration-tests/with-networks/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ npx hardhat starknet-deploy --starknet-network "$INVALID_NETWORK" "$ARTIFACT_PAT
echo "Success"

echo "Testing no mocha network"
NETWORK="" npx hardhat test test/contract-factory-test.ts
NETWORK="" npx hardhat test --no-compile test/contract-factory-test.ts
echo "Success"

echo "Testing invalid mocha network"
NETWORK="$INVALID_NETWORK" npx hardhat test test/contract-factory-test.ts 2>&1 \
NETWORK="$INVALID_NETWORK" npx hardhat test --no-compile test/contract-factory-test.ts 2>&1 \
| tail -n +9 \
| head -n 6 \
| diff - "$PREFIX/invalid-mocha-network.txt"
Expand Down
2 changes: 1 addition & 1 deletion test/general-tests/function-argument-number/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -e

npx hardhat starknet-compile contracts/contract.cairo
npx hardhat test test/function-args-test.ts
npx hardhat test --no-compile test/function-args-test.ts
2 changes: 1 addition & 1 deletion test/general-tests/getContractFactory/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -e

npx hardhat starknet-compile
npx hardhat test test/path-test.ts
npx hardhat test --no-compile test/path-test.ts
2 changes: 1 addition & 1 deletion test/general-tests/plain/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ PUBLIC_KEY=162844874164824503680000290607522570510059613613391289501503590295412
npx hardhat starknet-compile
npx hardhat starknet-deploy starknet-artifacts/contracts/contract.cairo/ --starknet-network "$NETWORK" --inputs "$INITIAL_VALUE"
npx hardhat starknet-deploy starknet-artifacts/contracts/auth_contract.cairo/ --inputs "$PUBLIC_KEY $INITIAL_VALUE" --starknet-network "$NETWORK"
npx hardhat test test/sample-test.ts
npx hardhat test --no-compile test/sample-test.ts
2 changes: 1 addition & 1 deletion test/general-tests/short-string-test/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ cd ..

# The config file used for running mocha tests is the one in root

npx hardhat test test/general-tests/short-string-test/short-string-test.ts
npx hardhat test --no-compile test/general-tests/short-string-test/short-string-test.ts
2 changes: 1 addition & 1 deletion test/general-tests/transaction-signing/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
set -e

npx hardhat starknet-compile contracts/auth_contract.cairo
npx hardhat test test/signing-test.ts
npx hardhat test --no-compile test/signing-test.ts
2 changes: 1 addition & 1 deletion test/general-tests/wallet-test/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ npx hardhat starknet-compile contracts/contract.cairo
output=$(npx hardhat starknet-deploy-account --starknet-network "$NETWORK" --wallet OpenZeppelin)
echo $output

npx hardhat test test/wallet-test.ts
npx hardhat test --no-compile test/wallet-test.ts
2 changes: 1 addition & 1 deletion test/venv-tests/with-venv/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ INITIAL_VALUE=10

npx hardhat starknet-compile
npx hardhat starknet-deploy starknet-artifacts/contracts/contract.cairo/ --starknet-network "$NETWORK" --inputs "$INITIAL_VALUE"
npx hardhat test test/quick-test.ts
npx hardhat test --no-compile test/quick-test.ts

0 comments on commit bfe2e76

Please sign in to comment.