Skip to content

feat(test): add test.each and test.for - #1882

Merged
okwasniewski merged 9 commits into
e2e-inc:mainfrom
bardrop-oss:feat/test-each
Nov 19, 2026
Merged

okwasniewski merged 9 commits into
e2e-inc:mainfrom
bardrop-oss:feat/test-each

Conversation

@bardrop

@bardrop bardrop commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Adds test.each(rows) and test.for(rows), the Vitest shape: one test per row, titled from the row.

test.each([{ user: 'Ada' }, { user: 'Grace' }])('signs in as $user', async ({ user }, { app }) => { ... });
test.each([[1, 2, 3]])('%i + %i = %i', async (a, b, sum, { app }) => { ... });
test.for([[1, 2]])('pair %i and %i', async ([a, b], { app }) => { ... });
  • Titles: $name / $name.path read an object row; %s %d %i %f %j %o take an array row's items in order; %# is the index, %$ the row number, %% a percent sign. Formatting is one pass, so a value is never read as a token (packages/e2e/src/collect/each.ts). A title is always one line: an Error shows as its name and message, not its stack.
  • test.each spreads the rows into the body's args when every row is an array (decided once per table, as Vitest does); test.for passes the row whole. The fixtures come last in both.
  • Fixtures are set up on demand since feat(test)!: set fixtures up on demand, once per worker, and in beforeAll #1891, from the names a body destructures. A row body takes its row first, so its names are read from the parameter after the row (fixtureNames(fn, what, source, position) in packages/e2e/src/collect/fixture-names.ts). (row, fixtures) => {} and (...args) => {} are a COLLECTION_ERROR, as (fixtures) => {} is for a plain test.
  • Each row goes through the same registration as test() (packages/e2e/src/collect/registry.ts), so options (skip, tags, timeout), serial groups, and duplicate-title checks work as for a plain test. Every row is located at its test.each call, through a helper too: the source location now reads the whole stack, not the default 10 frames.
  • Empty or non-array rows, and a tagged template table, throw COLLECTION_ERROR.
  • Types: TestAPI.each / TestAPI.for in packages/core/src/types.ts; pinned in tests/types/sdk-types.ts, incl. tuple rows typed per position.

Out of scope: describe.each, and .each chained after skip/only/skipIf.

Issue

Part of #1855 (Test runner row).

Verified

Ran it locally: yes

  • testbed, built CLI, scratch file tests/zz-each.e2e.ts: object rows and spread rows that fill the real todos page under a beforeEach, test.for, rows that name no fixture, an Error row, and skipped rows.
node node_modules/e2e/dist/cli/bin.js run tests/zz-each.e2e.ts
   ↓ |web| tests/zz-each.e2e.ts > skipped left [not this one]
   ↓ |web| tests/zz-each.e2e.ts > skipped right [not this one]
   ✓ |web| tests/zz-each.e2e.ts > each > adds todo Buy milk 347ms
   ✓ |web| tests/zz-each.e2e.ts > each > adds todo Walk dog 117ms
   ✓ |web| tests/zz-each.e2e.ts > each > adds One and Two, 2 todos 127ms
   ✓ |web| tests/zz-each.e2e.ts > each > adds Three and Four, 2 todos 114ms
   ✓ |web| tests/zz-each.e2e.ts > each > adds Ship runner (row 1) 102ms
   ✓ |web| tests/zz-each.e2e.ts > 1 + 2 = 3 3ms
   ✓ |web| tests/zz-each.e2e.ts > 2 + 3 = 5 4ms
   ✓ |web| tests/zz-each.e2e.ts > rejects with RangeError: too far 9ms
 Test Files  1 passed (1)
      Tests  8 passed | 2 skipped (10)
  • e2e list shows one entry per row with the formatted title.
  • Failure path: a body that takes the fixtures whole, a rest parameter, and a template table each exit 2 before anything runs.
tests/zz-each-bad.e2e.ts:3: test "signs in as Ada" must destructure parameter 2, where it takes the fixtures, as in ({ app, screen }) => {}; it takes "fixtures". e2e sets up only the fixtures a function names there
tests/zz-each-bad.e2e.ts:3: test "adds 1 and 2" must destructure parameter 3, where it takes the fixtures, as in ({ app, screen }) => {}; it takes "...numbers". e2e sets up only the fixtures a function names there
tests/zz-each-bad.e2e.ts: test.each() takes an array of rows, not a template literal table; write each row as an object or an array

Checklist

  • Changeset added (pnpm changeset) for any change to a published package, or the change is testbed, docs, or CI only.
  • Breaking change: title carries !, the changeset body names what breaks and what replaces it, and the deprecation warning landed a window earlier (stability policy in CONTRIBUTING.md).
  • Docs updated in the same PR: the docs/**/*.mdx page for the behavior, and skills/e2e/ if the skill describes it.
  • Contract change: emitted .d.ts reviewed, tests/types/sdk-types.ts updated; wire change edits the schema and both fixtures.
  • Engine contract change (e2e/engine): changesets for e2e, @e2e-dev/web, and @e2e-dev/mobile.

View guided diff

@github-actions github-actions Bot added the size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile label Nov 17, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 10 files

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

Comment thread packages/e2e/src/collect/each.ts Resolved
Comment thread docs/reference/test.mdx Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 3 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[claude-opus-5-5] automated review on behalf of @okwasniewski

Reviewed b8fd388 (main b369e38), compared with Vitest 5.1.0's formatTitle / taskFn.each / taskFn.for by running the same rows through both. Call shapes work with options, serial groups and test.extend, and the unit tests kill every mutant I tried.

Must fix

  • packages/e2e/src/collect/each.ts display() and %o: inspect(value, { breakLength: Infinity, depth: 4 }) still breaks lines, because Node's default compact: 3 groups arrays over 6 items and splits objects nested 4+ deep. test.each([[[1,2,3,4,5,6,7]]])('ids %s', ...) registers "ids [\n 1, 2, 3, 4,\n 5, 6, 7\n]" and the test id becomes tests/p.e2e.ts::ids%20%5B%0A... (confirmed on the fake engine). $tags with 7+ items hits the same. Titles are test ids, so they must be one line. Fix: add compact: true (keeps a 30-item array and a 5-deep object on one line) and a title test row for it.

Should fix

  • registry.ts eachRegistrar decides per row whether to spread. Vitest (cases.every(Array.isArray)) and Jest decide once for the table, so in test.each([[1, 'one'], { user: 'Ada' }]) Vitest passes every row whole, while here fixtures land at a different position per row. Spread only when every row is an array and make EachArgs non-distributive ([Row] extends [readonly unknown[]]). The unit test "passes test.each rows spread..." locks in the current behavior.
  • each.ts json(): the catch turns every error into [Circular], so a BigInt row is titled [Circular] and two of them fail with a duplicate-title error about a value they never had. Rethrow non-circular errors as a COLLECTION_ERROR naming the row, as Vitest does.
  • The docs say "as in Vitest". Either close these or say they differ: $0/$1 on array rows, $key read from an array row whose first item is an object, %s using a custom toString (URL prints its href, here it dumps the inspected object), %O, %c.

Nits

  • eachRegistrar repeats registrar (requireCollector, modeOf, registerTest). Registering each row through registrar(api)(rowTitle, options, rowFn) removes the copy.
  • Docs: a %# title changes id when rows move; one line recommending $name for stable ids helps.
  • %f on -0 prints 0, Vitest prints -0.

Verified: registry.test.ts 47/47, the new runner-lifecycle case, tsc --noEmit incl. sdk-types.ts (ragged rows, as const tuples infer right), lint, CI green. Mutants killed: no spread, empty chain, mode ignoring options, %# off by one, leftover placeholders, $name on non-object rows, empty rows accepted, %% dropped.

@okwasniewski

Copy link
Copy Markdown
Member

[claude-opus-5-5] automated review on behalf of @okwasniewski

Heads-up: the Japanese docs (#1875) landed on main after this branched. docs/reference/test.mdx gains new headings and code blocks here, and check-docs-translations requires docs/ja/reference/test.mdx to keep the same outline and code. When you merge main, mirror the new sections and code blocks in the ja page (see authoring-docs, "Translations"), then run pnpm run docs:check.

@bardrop

bardrop commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the careful review. Rebased on main (with the ja and zh docs) and pushed bb7e133.

Must fix

  • Titles: display() and %o now use inspect with compact: true. test.each([[[1,2,3,4,5,6,7]]])('ids %s') gives ids [ 1, 2, 3, 4, 5, 6, 7 ], and $tags with 7 items plus a 5-deep %o object stay on one line. Both are new rows in the title test.

Should fix

  • Spreading is decided once for the table: rows are spread only when every row is an array, like Vitest's cases.every(Array.isArray). EachArgs is now non-distributive ([Row] extends [readonly unknown[]]), so a mixed table types as (row, fixtures) too. The spread test now covers an all-array table and a mixed one, and sdk-types.ts has a mixed-table case.
  • %j: only a circular value becomes [Circular]. Any other failure throws COLLECTION_ERROR naming the row, e.g. %j cannot format the row at index 1: Do not know how to serialize a BigInt. Tested both.
  • Docs: dropped "as in Vitest" and listed the differences ($0/$1, $name from an array row's first item, %s vs a custom toString, %O, %c). Also noted the all-array spread rule, [Circular], and the new error row.

Nits

  • eachRegistrar now registers each row through registrar(api)(rowTitle, options, rowFn), so the copy of requireCollector / modeOf / registerTest is gone.
  • Docs recommend $name or a value placeholder over %# / %$ for stable ids.
  • %f on -0 (number or '-0') prints -0.

The ja and zh pages mirror the new test.each / test.for sections, member table rows and type blocks. pnpm run docs:check passes (162 translated pages match).

Checked: packages/e2e vitest 4873 passed, tsc --noEmit in core and e2e, pnpm lint, plugins:check, check:changeset-bumps, check:dead-code.

@github-actions github-actions Bot added size:XL Up to 999 changed lines, not counting tests, fixtures, translated docs, or the lockfile and removed size:L Up to 499 changed lines, not counting tests, fixtures, translated docs, or the lockfile labels Nov 17, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

Comment thread packages/core/src/types.ts Resolved
Comment thread packages/e2e/src/collect/each.ts Resolved
Comment thread docs/reference/test.mdx Resolved
Comment thread docs/zh/reference/test.mdx Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 7 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

Comment thread docs/reference/test.mdx Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 3 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[claude-opus-5-5] automated review on behalf of @okwasniewski

Re-checked 89622e9 (main fabb0c0) against the earlier review, compared with Vitest 5.1.0's formatTitle / format / taskFn.each / taskFn.for from node_modules (the version this repo installs).

Earlier asks, all done:

  • One-line titles: inspect uses compact: true; 7-item arrays, $tags and 5-deep %o stay on one line (test rows added).
  • Spread decided once per table (every(Array.isArray), as Vitest), EachArgs non-distributive, unknown rows typed [...unknown[], Fixtures].
  • %j: only Node's circular TypeError becomes [Circular], other failures throw COLLECTION_ERROR naming the row.
  • eachRegistrar goes through registrar(api); %f on -0; stable-id note; Vitest differences listed in the docs.
  • ja + zh mirrors cover the new sections, member rows and type blocks; docs:check passes (162 pages match). Every cubic thread is fixed at this head.

Should fix

  • packages/e2e/src/collect/each.ts json(): JSON.stringify(value) ?? String(value) puts a function's full source in the title when %j gets a function, so test.each([[function named(a) {\n return a;\n}]])('%j', ...) registers a multi-line title (and test id). That's the same one-line problem the earlier must-fix was about. Vitest prints undefined here (and for a Symbol). Fix: ?? 'undefined', plus a title row.

Nits

  • registry.ts modeOf() now has one caller (registrar), since eachRegistrar goes through registrar. Inline it back so the diff stays small.
  • .changeset/test-each-for.md still says the title formats "as in Vitest", which the docs now walk back. Drop that phrase.
  • TOKEN only matches ASCII keys, so $名前 stays as written. Vitest matches \p{ID_Continue}. Use [\p{ID_Start}_$][\p{ID_Continue}$]* with the u flag, or list it with the other differences.
  • Docs list title differences but not that Vitest's test.each body gets no test context, while here the fixtures come last. One clause in the differences bullet covers it.

Verified: CI green at 89622e9 (all checks). Locally: registry.test.ts 47/47, oxlint clean, docs:check clean, tsc clean apart from errors in packages I didn't build (@e2e-dev/web, e2e/engine). Mutants killed: every -> some on the spread rule, compact: true removed, any TypeError treated as circular, [Circular] path removed, -0 special case removed. Probed %j on a function and a Symbol, $名前, $user., a custom toString and %i%% %s directly through formatEachTitle. The $user., custom toString and %i%% %s cases are fine: the first and last are better than Vitest, and the toString one is already documented.

Waiting on a maintainer decision: truncate long values in titles like Vitest (40 chars) or not; settle before merge since it changes test ids. Labeling for human review.

@okwasniewski
okwasniewski dismissed their stale review November 17, 2026 22:24

Earlier asks done, see latest automated review.

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 17, 2026
@bardrop

bardrop commented Nov 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, all five done in 2c5541a:

  • %j now prints undefined for a function, a Symbol and undefined, like Vitest. New title row covers all three.
  • $name and its path use [\p{ID_Start}_$][\p{ID_Continue}$]* with u, so $名前 and $ユーザー.名 read the row (title row added).
  • modeOf is inlined back into registrar, same as main.
  • Changeset no longer says "as in Vitest".
  • The differences bullet now says a Vitest test.each body gets only the row, while here the fixtures come after it (en/ja/zh).

registry.test.ts 47/47 (the new rows fail without the each.ts change), pnpm check clean.

On truncating long values in titles: happy to add Vitest's 40-char cut if you want it. I left titles whole for now since it changes test ids.

@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 17, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0 issues found across 7 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

View guided diff | Re-trigger cubic

@bardrop

bardrop commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

The ios deterministic failure on 2c5541a looks unrelated: 12 app flows timed out waiting for labels like Control Inventory. in the simulator, and the commit only changes how test.each titles are formatted (%j and $key parsing). The same job passed on 89622e9. I can't re-run it from a fork, could someone with access kick it again?

@bardrop

bardrop commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Looked closer at the ios deterministic failure, now on 53218f2 (rebased on main): every one of the 12 screen-at-failure.txt files in the "Failure screens" step shows the same iOS system alert on top of the app:

alert "Open in “e2e Benchmark”?"
  button "Cancel"
  button "Open"

So the deep-link confirm prompt from device fixture > openLink stays up on that simulator, and every later test on it can not see the home list (getByLabel("Control Inventory. ") → no node). This PR only touches test collection (test.each / test.for), nothing in the mobile flow. Same job and same cached app (mobile-benchmark-ios-8abd01fd…) passed on fix/strict-cache-long-test-id two minutes earlier, where SAME_REPO is true; here it is false (fork). Happy to rebase again if a re-run helps.

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[claude-opus-5-5] automated review on behalf of @okwasniewski

Re-checked 53218f2 (main 66d07ca). The branch was rebased: git range-diff shows all six commits identical to the old ones, and 53218f2 is 2c5541a rebased onto current main.

Earlier asks, all done:

  • %j prints undefined for a function, a Symbol and undefined, so a function's source can't land in a title. Same as Vitest 5.1.0.
  • $name and its path segments use \p{ID_Start} / \p{ID_Continue} with u, the same character class as Vitest's formatAttribute. $名前 and $ユーザー.名 read the row.
  • The mode is inlined back into registrar, so it matches main and registry.ts only gains the each/for code.
  • The changeset no longer says "as in Vitest". The differences bullet now covers the body shape (fixtures come after the row), mirrored in ja and zh.

Must fix: none.

Should fix: none.

CI: everything is green except ios deterministic (and the mobile gate that depends on it). That failure is not caused by this PR. In the first pass, on simulator 15C2, iOS's "Open in "e2e Benchmark"?" prompt from device-fixture.e2e.ts > openLink never got dismissed. Every later test on that simulator then failed in openScenario with the prompt still on screen (see screen-at-failure.txt in the artifact). In the --last-failed rerun, the device-fixture tests passed on the other simulator (5D7D), and the flows-lists tests failed again on 15C2, which was still blocked. No mobile-benchmark test uses test.each / test.for, and the diff only touches title formatting, the each/for registrars, types and docs. I re-ran the failed jobs.

Verified:

  • registry.test.ts passes 47/47.
  • oxlint is clean, docs:check passes (162 translated pages match), and tsc is clean apart from imports of packages I didn't build (@e2e-dev/web, e2e/engine).
  • The skill copies are in sync.
  • Killed three mutants: ?? 'undefined' back to ?? String(value), the first $key segment back to ASCII, and the path segments back to \w.

Still waiting on the maintainer decision from the last pass: whether to truncate long values in titles like Vitest does (40 chars). It changes test ids, so settle it before merge.

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 18, 2026
…s [Circular]

An unknown row may be spread or passed whole at run time, so EachArgs
now types only the fixtures, last. %j only reads Node's circular-structure
TypeError as a cycle; a toJSON that throws names the row. Docs say %d
keeps BigInt's n suffix and shows Symbol as NaN, and that a string title
value keeps its line breaks.
…de $keys

- %j prints undefined for what JSON leaves out, as Vitest does, so a
  function's source never lands in a title
- $name and its path read Unicode identifier characters
- inline the test mode back into registrar
- docs: note that a Vitest test.each body gets no fixtures
Fixtures are now set up on demand from what the body destructures (#1891).
A test.each row runs a wrapper, (fixtures) => body(...row, fixtures), so
registration read the wrapper's own parameter and refused every row with
"must destructure its first parameter". registerTest now takes the body
and the position of its fixtures parameter (the row's length when it is
spread, else 1), and fixtureNames reads that parameter.
@github-actions github-actions Bot removed the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 18, 2026
@bardrop

bardrop commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on main (54d5ea0) after #1891.

#1891 sets fixtures up from what a function destructures, and a test.each row runs a wrapper (fixtures) => body(...row, fixtures), so after the rebase every row failed with "must destructure its first parameter". New commit 54d5ea0: registerTest takes the body and where its fixtures parameter is (the row length when the row is spread, else 1), and fixtureNames reads that parameter. A body that takes the fixtures whole or as ...args gets the same error, naming the parameter:

test "whole 0" must destructure parameter 3, where it takes the fixtures, as in ({ app, screen }) => {}; it takes "fixtures"

An unknown-row test.each(loose) can't name its fixtures any more (the position depends on the rows), so the type test now uses test.for(loose) for that case, and the API docs say to destructure the fixtures.

Checked: pnpm check green, e2e unit 4100 pass, runner-lifecycle integration 39 pass, and the testbed CLI run from the description again passes 5/5 (object rows that fill the real todos page, array rows, test.for).

- An Error in a title shows as its name and message, not its stack, and
  whatever inspect still breaks is joined, so a title is always one line
- The source location reads the whole stack: the default 10 frames cut the
  test file off a row declared through a helper and a describe
- A tagged template table is a COLLECTION_ERROR instead of one test per
  template chunk
- A bound row body is told how to wrap itself with the row first
- tests: a run sets up only the fixtures a row body names; fixtureNames at
  a position
- docs, skill, changeset: a row body names its fixtures after the row
@okwasniewski

Copy link
Copy Markdown
Member

[claude-fable-5-2] automated review on behalf of @okwasniewski

Re-checked 54d5ea0 (main 847a09e). The rebase and the fixture fix are right: the fixtures parameter is the row's length when the row is spread, else 1, and a body that takes them whole or in a rest parameter is refused. CI is green. On the built CLI against the testbed, object rows and spread rows fill the todos page under a beforeEach, test.for works, and rows that name no fixture open no page.

A fresh review found four more things. I fixed them, but I can't push here: the fork is org-owned, so GitHub refuses maintainer pushes. They are one commit on top of your head, 68f021563 on oskar/test-each-review-fixes. It fast-forwards this branch:

git pull --ff-only https://github.com/e2e-inc/e2e.git oskar/test-each-review-fixes
git push

Must fix (each has a test that fails without the fix)

  • each.ts display() and %o: an Error prints its stack. test.each([new Error('boom')])('fails with %s', ...) fails the file with title must be 1 through 512 UTF-8 bytes after NFC, got 1262, and a short stack registers a multi-line id with absolute paths in it. Now an Error shows as Error: boom, as in Vitest, and whatever inspect still breaks (the stack of an Error inside a value, a custom inspect, a Symbol description) is joined to one line.
  • registry.ts stackLocations(): a row declared through a helper that wraps a describe is located in the helper file, while a plain test() beside it is located at the helper's call in the test file. test.each adds three runner frames, which pushes the test file's frame past the default 10-frame stack limit. It now reads the whole stack. New case in test-source.test.ts.

Should fix

  • readRows: the tagged template form (test.each`a | b` ) passes Array.isArray, so it registers one test per template chunk. Now a COLLECTION_ERROR, listed with the Vitest differences.
  • fixtureNames: a bound row body is told to wrap itself as (row, { app }) => bound(row, { app }).
  • Tests: on-demand-fixtures.test.ts runs rows and checks that only the fixtures a row body names are set up, and that the two refusals reach a run as collection errors. fixture-names.test.ts covers the position.
  • Docs (en, ja, zh), the skill and the changeset say that a row body names its fixtures in the parameter after the row; the Throws table gains that row. One line in fixtures' section links back.

Not changed: a regex literal default before the fixtures parameter (async (sep = /\//, { app }) => {}) is misread by the parameter parser. Main has the same gap for the first parameter, so it is a follow-up.

Verified on 68f021563: pnpm check, packages/e2e vitest (349 files, 5177 passed), and the testbed CLI run above plus the three refusals (fixtures whole, rest parameter, template table).

@bardrop

bardrop commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the fixes. I pulled 68f021563 as a fast-forward and pushed it, so the PR head is now 68f0215. The four fixes look right to me, and so does leaving the regex-default parsing as a follow-up.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 13 files (changes from recent commits).

Heads up: you’ve reached your flex budget. Increase your flex budget or wait for usage to reset.

Requires human review: Auto-approval skipped because cubic reviewed only this push, not the earlier force-push. Comment @cubic review to review the whole pull request.

View guided diff | Re-trigger cubic

Comment thread skills/e2e/references/writing-tests.md Resolved
Comment thread packages/e2e/src/collect/each.ts Resolved
Comment thread packages/e2e/src/collect/registry.ts Resolved
- stackLocations puts Error.stackTraceLimit back in a finally
- Only an own raw property marks a template table
- The wrap hint for a bound row body names one argument per row item
- skill: rows are spread only when every row is an array
@okwasniewski

Copy link
Copy Markdown
Member

[claude-fable-5-2] responding on behalf of @okwasniewski

Thanks for pulling it. The review bot found four small things in my commit, all valid. They are fixed in 5d08151e8, again a fast-forward of this branch:

git pull --ff-only https://github.com/e2e-inc/e2e.git oskar/test-each-review-fixes
git push
  • stackLocations restores Error.stackTraceLimit in a finally.
  • readRows reads only an own raw as a template table.
  • The wrap hint for a bound row body names one argument per row item.
  • The skill says rows are spread only when every row is an array.

Each code change has a test that failed before it. pnpm check and the packages/e2e suite (349 files, 5178 passed) pass on 5d08151e8.

@bardrop

bardrop commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

The four cubic points on 68f0215 were all real. Fixed in b6856a9, with a test for each code change that fails before it:

  • registry.ts stackLocations(): Error.stackTraceLimit is put back in a finally, so a throwing Error.prepareStackTrace no longer leaves it at Infinity.
  • each.ts readRows: Object.hasOwn(rows, 'raw') instead of 'raw' in rows, so only a real template table is refused, not an array that inherits raw.
  • fixture-names.ts: the bound-function hint for a spread row names one parameter per value: (v1, v2, v3, { app }) => bound(v1, v2, v3, { app }). A single row still reads (row, { app }).
  • Skill (both copies): a row is spread only when every row is an array, else it is passed whole. The docs pages already said so.

pnpm check passes, and so does packages/e2e vitest (5185 passed), except bun-runtime.test.ts's shebang case. That one fails the same way on 68f0215 on my machine, so it is my local Bun, not this change.

@bardrop

bardrop commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Our fixes crossed: I pushed b6856a9 for the same four points before I saw yours. Same changes, so I reset the branch to your 5d08151e8 and force-pushed. The PR head is now 5d08151, and b6856a9 is gone.

@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Nov 18, 2026
@okwasniewski
okwasniewski added this pull request to the merge queue Nov 19, 2026
Merged via the queue into e2e-inc:main with commit a213247 Nov 19, 2026
28 checks passed
samanyudas added a commit to samanyudas/e2e that referenced this pull request Nov 19, 2026
Resolve e2e-inc#1882's split of registrar into registerOne: registerOne takes
skip as boolean | 'fixme' | undefined and owns the fixme options and mode,
and registrar passes skip through. Keep both sides of the sdk-types and
runner-lifecycle cases.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. size:XL Up to 999 changed lines, not counting tests, fixtures, translated docs, or the lockfile

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants