Skip to content

Commit 7cb4a6f

Browse files
authored
Merge branch 'main' into t3code/efdfa7e7
2 parents 7227723 + dba1a78 commit 7cb4a6f

9 files changed

Lines changed: 1567 additions & 266 deletions

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,18 @@ Run the full test suite:
126126
bun run test
127127
```
128128

129+
Run fast coverage checks:
130+
131+
```bash
132+
bun run coverage
133+
```
134+
135+
Run full coverage, including the slow Solidity bytecode trace phase:
136+
137+
```bash
138+
bun run coverage:full
139+
```
140+
129141
Type-check the TypeScript code:
130142

131143
```bash
@@ -188,5 +200,6 @@ Use `ANVIL_RPC=http://host.docker.internal:8545 bun run gas-costs` when the comm
188200
- `bun install --frozen-lockfile` must be run before standalone commands like `bun run tsc` on a fresh checkout.
189201
- `bun run tsc` is a pure typecheck for the app TypeScript, the Solidity-side TypeScript utilities, and the Bun build/dev scripts. It does not regenerate shared assets or vendor output.
190202
- `bun run test` runs the TypeScript check first, then executes the test suite.
203+
- `bun run coverage` runs the fast UI and contract TypeScript coverage phases. Use `bun run coverage:full` when you also need the slower Solidity bytecode trace coverage phase.
191204
- The legacy `ui:*` commands still exist as compatibility aliases, but `app:*` names are the clearer entrypoints because they run more than frontend-only work.
192205
- The repo uses exact dependency versions for reproducible installs.

bun-test-setup-solidity.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
import './bun-test-setup.js'

bun-test-setup-ui.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { afterEach, beforeEach } from 'bun:test'
2+
import { resetActiveEnvironmentForTesting } from './ui/ts/lib/activeEnvironment.js'
3+
4+
beforeEach(() => {
5+
resetActiveEnvironmentForTesting()
6+
})
7+
afterEach(() => {
8+
resetActiveEnvironmentForTesting()
9+
})

bun-test-setup.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
import { beforeEach, setDefaultTimeout } from 'bun:test'
2-
import { ensureContractArtifactsAreCurrent } from './scripts/ensure-contract-artifacts.mts'
3-
import { afterEach, mock } from 'bun:test'
4-
import { resetActiveEnvironmentForTesting } from './ui/ts/lib/activeEnvironment.js'
1+
import { afterEach, beforeEach, mock, setDefaultTimeout } from 'bun:test'
52

63
setDefaultTimeout(300000)
74

8-
await ensureContractArtifactsAreCurrent()
95
beforeEach(() => {
10-
resetActiveEnvironmentForTesting()
116
mock.restore()
127
})
138
afterEach(() => {
14-
resetActiveEnvironmentForTesting()
159
mock.restore()
1610
})

0 commit comments

Comments
 (0)