Skip to content

Commit 13bdd61

Browse files
committed
fixup! fix(@schematics/angular): handle done callbacks in focused and skipped tests
1 parent 50abb5f commit 13bdd61

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎packages/schematics/angular/refactor/jasmine-vitest/transformers/jasmine-lifecycle.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,10 @@ export function transformDoneCallback(node: ts.Node, refactorCtx: RefactorContex
314314

315315
const isLifecycleHook =
316316
ts.isIdentifier(node.expression) &&
317-
['beforeEach', 'afterEach', 'beforeAll', 'afterAll'].includes(node.expression.text);
317+
(node.expression.text === 'beforeEach' ||
318+
node.expression.text === 'afterEach' ||
319+
node.expression.text === 'beforeAll' ||
320+
node.expression.text === 'afterAll');
318321
if (!isItCallExpression(node.expression) && !isLifecycleHook) {
319322
return node;
320323
}

0 commit comments

Comments
 (0)