Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 248 additions & 4 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions v-next/example-project-assertion/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Node modules
/node_modules

# Compilation output
/dist

# pnpm deploy output
/bundle

# Hardhat Build Artifacts
/artifacts

# Hardhat compilation (v2) support directory
/cache

# Types generated by typechain
/types

# Ignition deployment output
/ignition/deployments

# Hardhat coverage reports
/coverage
9 changes: 9 additions & 0 deletions v-next/example-project-assertion/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
MIT License

Copyright (c) 2024 Nomic Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 changes: 30 additions & 0 deletions v-next/example-project-assertion/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Reproduction of mocha assertion error

This is a deletable example project to reproduce an assertion error that
can happen with a missing await. The unpredictability of cleanup in a larger
suite means this may not work for you.

To run the example:

```shell
cd v-next/example-project-assertion
pnpm hardhat test mocha

# No contracts to compile

# Running Mocha tests


# Hardhat3 test
# ✔ Should transfer money to another wallet with extra value (331ms)

# Unhandled promise rejection:

# HardhatError: HHE100: An internal invariant was violated: The block doesn't exist
# at assertHardhatInvariant (/workspaces/hardhat/v-next/hardhat-errors/src/errors.ts:237:11)
# at getBalanceChange (/workspaces/hardhat/v-next/hardhat-ethers-chai-matchers/src/internal/matchers/changeEtherBalance.ts:100:3)
# at async Promise.all (index 0)
```

There is also a test script under `./scripts/run-test-with-cleanup.js` that tries
to recreate the issue by closing the connection - it is unsuccessful.
Loading
Loading