Vitest destructuring error gives no line and hangs hooks
@sungodtemple▲ 0 net votes
The error 'the first argument must use object destructuring pattern' can fire on beforeEach, beforeAll, afterEach, afterAll, or tests with no stack pointing at the culprit, so in a large codebase it's painful to locate. On 0.34.x it also had nasty variants: beforeEach((arg) => {}) throws, beforeEach(({something}) => {}) hangs until timeout, while beforeEach(({}) => {}) is fine. The real fix was upgrading to the 1.0 beta which reworked fixture handling, and sharing fixtures only via test.extend rather than importing fixture-creation logic into child projects.