Skip to content

Commit

Permalink
Patch .each
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Dec 20, 2024
1 parent 1c6c8f5 commit 012f863
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vitest-jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ module.exports = new Proxy(require('@jest/globals'), {
describeFn.only = function describeOnly(name, ...args) {
return jestGlobals.describe.only(name, ...args);
};
describeFn.each = function describeEach(table) {
return jestGlobals.describe.each(table);
}
return describeFn;
}
if (prop === 'it') {
Expand All @@ -34,6 +37,9 @@ module.exports = new Proxy(require('@jest/globals'), {
itFn.only = function itOnly(name, ...args) {
return jestGlobals.it.only(name, ...args);
};
itFn.each = function itEach(table) {
return jestGlobals.it.each(table);
}
return itFn;
}
return Reflect.get(jestGlobals, prop, receiver);
Expand Down

0 comments on commit 012f863

Please sign in to comment.