test(e2e): consolidate automine contracts and effects suites#24490
Open
spalladino wants to merge 2 commits into
Open
test(e2e): consolidate automine contracts and effects suites#24490spalladino wants to merge 2 commits into
spalladino wants to merge 2 commits into
Conversation
Round-2 consolidation of the automine contracts/effects/accounts tests.
- Merge effects/{event_only,custom_message.parallel,large_public_event} into
effects/events.test.ts (one node, per-contract describes).
- Merge contracts/nested/{manual_private_call,manual_public.parallel,
manual_private_enqueue.parallel} into contracts/nested/manual_calls.test.ts
(single beforeAll, fresh child per test only where storage is asserted).
- Add real assertions to the previously zero-assertion nested-call and importer
tests (child state / return values / duplicate-nullifier effects).
- Convert contracts/static_calls.test.ts to an it.each table, collapse
accounts/scope_isolation.test.ts via describe.each, and de-parallel
contracts/{option_params,nested_utility_calls} into plain files with tables.
- Extract a file-local expectInitialized helper in contracts/state_vars.test.ts.
- Drop the no-op proverTestVerificationDelayMs option in mempool_limit.test.ts.
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.
Round-2 e2e consolidation (PR 2 of 9), scoped to
automine/contracts/**,automine/effects/**,automine/accounts/scope_isolation.test.ts, andautomine/mempool_limit.test.ts. All 8 touched files pass locally.Merges (old → new)
effects/{event_only.test.ts, custom_message.parallel.test.ts, large_public_event.test.ts}→effects/events.test.ts— onebeforeAllnode, per-contractdescribeblocks. custom_message loses its.parallelsuffix (bodies are tiny; one container is a net win). 3 files → 1.contracts/nested/{manual_private_call.test.ts, manual_public.parallel.test.ts, manual_private_enqueue.parallel.test.ts}→contracts/nested/manual_calls.test.ts— singlebeforeAlldeploying a shared Parent/Child; the public and enqueued-call suites redeploy a fresh Child per test because each asserts an absolute post-increment storage value that only holds from a zero start. 3 files → 1.Table / de-parallel conversions
accounts/scope_isolation.test.ts— theexternal private/external utilitydescribes (structural duplicates differing only by a_utilitymethod suffix) collapsed viadescribe.each.contracts/option_params.parallel.test.ts→contracts/option_params.test.ts(plain) +it.eachover the public/utility/private variants.contracts/nested_utility_calls.parallel.test.ts→contracts/nested_utility_calls.test.ts(plain). See decision below.nested_utility_callsdecisionThe file has two describes with genuinely different setups — the first uses a plain PXE, the second registers a custom
pxeCreationOptions.hooks.authorizeUtilityCall. Per-container isolation was not the point (all bodies are fastsimulate()calls with no cross-test shared state; the hook describe already resets its state inbeforeEach), so I converted it to a single plain file with both describes, each keeping its ownbeforeAll(two sequential node bootstraps in one container — a CPU win over the previous 14 per-it containers). Within the hook describe the deny/allow × utility/private/view sextet is now anit.each; the two default-deny cases in the first describe are also tableized. Themsg_senderand note-sync tests stay explicit. Runs in well under the container timeout locally.Added assertions for previously zero-assertion its
manual_calls"performs a nested private call": now simulatesparent.entry_point → child.value(0)and asserts it returns the same preimage as a directchild.value(0)call, in addition to sending the tx for on-chain inclusion.manual_calls"performs public nested calls": now routespub_entry_point → pub_inc_value(42)on a fresh child and asserts child storage is 42 (was assertion-free).importer.parallel(stays.parallel, titles unchanged):call_no_argsasserts the imported call returns the Test contract address;call_public_fnandpub_call_public_fnassert the nullifier landed by checking that re-emitting it on the Test contract is rejected as a duplicate.Other
contracts/state_vars.test.ts: extracted a file-localexpectInitialized(interaction, expected)helper replacing ~15 repeatedis_*_initializedsimulate+expect blocks.mempool_limit.test.ts: removed the explicit no-opproverTestVerificationDelayMs: undefinedoption.Dropped assertions
None. Every asserted behavior is preserved; the zero-assertion its gained real assertions rather than losing any. Test discovery and the compat suite are glob-based, so no
bootstrap.sh/.test_patterns.ymledits were needed.