Skip to content

Commit bed4bd5

Browse files
hack(js): bump codemod test timeout
1 parent b1479dd commit bed4bd5

File tree

1 file changed

+41
-37
lines changed

1 file changed

+41
-37
lines changed

packages/turbo-codemod/__tests__/get-turbo-upgrade-command.test.ts

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ describe("get-turbo-upgrade-command", () => {
597597
mockedExec.mockRestore();
598598
mockGetAvailablePackageManagers.mockRestore();
599599
mockGetWorkspaceDetails.mockRestore();
600-
});
600+
}, 10000);
601601

602602
it.each([
603603
{
@@ -612,47 +612,51 @@ describe("get-turbo-upgrade-command", () => {
612612
fixture: "no-deps",
613613
name: "fails gracefully if package.json has no deps or devDeps",
614614
},
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,
627620
});
628621

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",
636643
});
644+
const mockGetWorkspaceDetails = jest
645+
.spyOn(turboWorkspaces, "getWorkspaceDetails")
646+
.mockResolvedValue(project);
637647

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+
});
650652

651-
expect(upgradeCommand).toEqual(undefined);
653+
expect(upgradeCommand).toEqual(undefined);
652654

653-
mockedExec.mockRestore();
654-
mockGetAvailablePackageManagers.mockRestore();
655-
mockGetWorkspaceDetails.mockRestore();
656-
});
655+
mockedExec.mockRestore();
656+
mockGetAvailablePackageManagers.mockRestore();
657+
mockGetWorkspaceDetails.mockRestore();
658+
},
659+
10000
660+
);
657661
});
658662
});

0 commit comments

Comments
 (0)