Skip to content

Commit

Permalink
test: enhance upgrade command tests for console output
Browse files Browse the repository at this point in the history
  • Loading branch information
bjohansebas committed Feb 9, 2025
1 parent 1a4e94c commit 3adb2cf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion commands/__test__/upgrade.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,11 @@ describe('Non-Interactive Mode', () => {

await upgrade('__testfixtures__')

expect(spyOnConsole).toHaveBeenCalled()
expect(spyOnConsole).toHaveBeenCalledTimes(5)
expect(spyOnConsole).toHaveBeenCalledWith('> Applying codemod: magic-redirect')
expect(spyOnConsole).toHaveBeenCalledWith('> Applying codemod: pluralized-methods')
expect(spyOnConsole).toHaveBeenCalledWith('> Applying codemod: req-param')
expect(spyOnConsole).toHaveBeenCalledWith('> Applying codemod: v4-deprecated-signatures')
expect(spyOnConsole).toHaveBeenLastCalledWith('\n> All codemods have been applied successfully. \n')
expect(run).toHaveBeenCalledTimes(4)
})
Expand Down

0 comments on commit 3adb2cf

Please sign in to comment.