You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using createTaskCollector, the argument order is different in version 1.3.0 when using test.each() and test().
From custom.test.ts in the reproduction example (see link below):
// copied from https://vitest.dev/advanced/runner.html#your-task-functionexportconsttest=createTaskCollector(function(this: any,name,fn,options){console.dir({
name,
fn,
options,},{showHidden: true,depth: null});getCurrentSuite().task(name,{
...this,// so "todo"/"skip"/... is tracked correctlymeta: {customPropertyToDifferentiateTask: true,},handler: async(...args: any[])=>{returnfn.apply(this,args);},
options,});});test('test',()=>{expect(true).toBe(true);});test.each([true,false]asconst)('test.each',(bool)=>{expect(bool).toBe(bool);});
The order was changed in #5142, but I guess we can keep the old order for the collector (it's not the public order) for now since it looks like a breaking change 🤔
Describe the bug
Using createTaskCollector, the argument order is different in version 1.3.0 when using test.each() and test().
From custom.test.ts in the reproduction example (see link below):
The output from console.dir:
This works fine in version 1.2.2
Reproduction
https://stackblitz.com/edit/vitest-dev-vitest-gxa45z?file=test%2Fcustom.test.ts
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: