Skip to content

Commit e1240c6

Browse files
JeanMechethePunderWoman
authored andcommitted
fix(zone.js): Add support for addition jest functions. (#57280)
This commit add support for `test.failing` and `it.failing`. Fixes #57277 PR Close #57280
1 parent d9d68e7 commit e1240c6

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

packages/zone.js/lib/jest/jest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ export function patchJest(Zone: ZoneType): void {
131131
};
132132
context[methodName].each = wrapTestFactoryInZone((originalJestFn as any).each);
133133
context[methodName].todo = (originalJestFn as any).todo;
134+
context[methodName].failing = (originalJestFn as any).failing;
134135
});
135136

136137
context.it.only = context.fit;

packages/zone.js/test/jest/jest.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ it.each`
9696
expect(bar).toBe(2);
9797
});
9898

99+
it.failing('it is not equal', () => {
100+
expect(5).toBe(6); // this test will pass
101+
});
102+
99103
test('test', () => {
100104
assertInsideProxyZone();
101105
});
@@ -104,6 +108,9 @@ test.each([[]])('test.each', () => {
104108
});
105109

106110
test.todo('todo');
111+
test.failing('it is not equal', () => {
112+
expect(5).toBe(6); // this test will pass
113+
});
107114

108115
function enableJestPatch() {
109116
global[Zone.__symbol__('fakeAsyncDisablePatchingFakeTimer')] = true;

0 commit comments

Comments
 (0)