test: drop hardhat and waffle in favour of plain ethers - #272
Open
rickstaa wants to merge 1 commit into
Open
Conversation
The harness only used hardhat as an RPC provider, a source of signers and a mocha launcher, and waffle for two event assertions. Replacing them with a JsonRpcProvider, an expectEvent helper and mocha run directly removes hardhat, ethereum-waffle, solc and apollo-fetch, and with them request, node-fetch 1.x, tough-cookie and json-schema. The block listener in mineBlocks is now removed once mining completes, so the suite exits instead of polling forever.
|
🚀 Subgraph Studio preview deployed
curl -H 'Content-Type: application/json' \
-d '{"query":"{ protocol(id: \"0\") { inflation } }"}' \
https://api.studio.thegraph.com/query/31909/livepeer-ci/pr-272-f0022fb-34342938562 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The test harness only used hardhat as an RPC provider, a source of signers and a mocha launcher, and waffle for two event assertions. This replaces them with an ethers
JsonRpcProvider, a smallexpectEventhelper that parses receipt logs, nativefetchin place of apollo-fetch, and mocha run directly with ts-node.hardhat.config.tsis gone andtsconfig.hardhat.jsonbecomestsconfig.test.json.That removes hardhat, both
@nomiclabsplugins, ethereum-waffle, apollo-fetch and solc, and with themrequest, node-fetch 1.x, tough-cookie, json-schema and the old mocha pins. Ten resolutions in #269 go with them, and the five remaining alerts from those packages clear. Staying on ethers v5 keeps typechain and the existing test idioms untouched; ethers v6 is a separate follow-up.Two fixes surfaced while doing this. The block listener in
mineBlockswas never removed, so the provider polled forever and the suite hung after printing its summary; it is now removed once mining completes. The ticket redemption test is skipped with a pointer to #267, and its ticket hash and signing are corrected so it is ready to re-enable once that is understood.yarn testnow exits 0 for the first time:subgraph does not failpasses, 24 pending, none failing. Closes #268.