@@ -597,7 +597,7 @@ describe("get-turbo-upgrade-command", () => {
597
597
mockedExec . mockRestore ( ) ;
598
598
mockGetAvailablePackageManagers . mockRestore ( ) ;
599
599
mockGetWorkspaceDetails . mockRestore ( ) ;
600
- } ) ;
600
+ } , 10000 ) ;
601
601
602
602
it . each ( [
603
603
{
@@ -612,47 +612,51 @@ describe("get-turbo-upgrade-command", () => {
612
612
fixture : "no-deps" ,
613
613
name : "fails gracefully if package.json has no deps or devDeps" ,
614
614
} ,
615
- ] ) ( "$name" , async ( { fixture } ) => {
616
- const { root } = useFixture ( {
617
- fixture,
618
- } ) ;
619
-
620
- const mockedExec = jest
621
- . spyOn ( utils , "exec" )
622
- . mockImplementation ( ( command : string ) => {
623
- // fail the check for the turbo to force local
624
- if ( command . includes ( "bin" ) ) {
625
- return undefined ;
626
- }
615
+ ] ) (
616
+ "$name" ,
617
+ async ( { fixture } ) => {
618
+ const { root } = useFixture ( {
619
+ fixture,
627
620
} ) ;
628
621
629
- const mockGetAvailablePackageManagers = jest
630
- . spyOn ( turboUtils , "getAvailablePackageManagers" )
631
- . mockResolvedValue ( {
632
- pnpm : "8.0.0" ,
633
- npm : undefined ,
634
- yarn : undefined ,
635
- bun : undefined ,
622
+ const mockedExec = jest
623
+ . spyOn ( utils , "exec" )
624
+ . mockImplementation ( ( command : string ) => {
625
+ // fail the check for the turbo to force local
626
+ if ( command . includes ( "bin" ) ) {
627
+ return undefined ;
628
+ }
629
+ } ) ;
630
+
631
+ const mockGetAvailablePackageManagers = jest
632
+ . spyOn ( turboUtils , "getAvailablePackageManagers" )
633
+ . mockResolvedValue ( {
634
+ pnpm : "8.0.0" ,
635
+ npm : undefined ,
636
+ yarn : undefined ,
637
+ bun : undefined ,
638
+ } ) ;
639
+
640
+ const project = getWorkspaceDetailsMockReturnValue ( {
641
+ root,
642
+ packageManager : "pnpm" ,
636
643
} ) ;
644
+ const mockGetWorkspaceDetails = jest
645
+ . spyOn ( turboWorkspaces , "getWorkspaceDetails" )
646
+ . mockResolvedValue ( project ) ;
637
647
638
- const project = getWorkspaceDetailsMockReturnValue ( {
639
- root,
640
- packageManager : "pnpm" ,
641
- } ) ;
642
- const mockGetWorkspaceDetails = jest
643
- . spyOn ( turboWorkspaces , "getWorkspaceDetails" )
644
- . mockResolvedValue ( project ) ;
645
-
646
- // get the command
647
- const upgradeCommand = await getTurboUpgradeCommand ( {
648
- project,
649
- } ) ;
648
+ // get the command
649
+ const upgradeCommand = await getTurboUpgradeCommand ( {
650
+ project,
651
+ } ) ;
650
652
651
- expect ( upgradeCommand ) . toEqual ( undefined ) ;
653
+ expect ( upgradeCommand ) . toEqual ( undefined ) ;
652
654
653
- mockedExec . mockRestore ( ) ;
654
- mockGetAvailablePackageManagers . mockRestore ( ) ;
655
- mockGetWorkspaceDetails . mockRestore ( ) ;
656
- } ) ;
655
+ mockedExec . mockRestore ( ) ;
656
+ mockGetAvailablePackageManagers . mockRestore ( ) ;
657
+ mockGetWorkspaceDetails . mockRestore ( ) ;
658
+ } ,
659
+ 10000
660
+ ) ;
657
661
} ) ;
658
662
} ) ;
0 commit comments