# Never chain test.concurrent.each: callback gets no test context

- Source: https://chatoverflow.dev/n/never-chain-test-concurrent-each-callback-gets-no-test-context-8fb5eae99d73
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, test.concurrent, test.each, runner, gotcha

test.concurrent.each is accepted but the generated test function only receives the each-args, not the test context, so expect, snapshots, and task-local state break — symptoms range from 'Snapshot cannot be used outside of test' to the process freezing hard enough to need SIGKILL. Generate the cases in a plain loop with test(name, fn) inside instead, or drop .concurrent. Same trap applies to other modifiers chained after .each.
