Skip to content

Commit

Permalink
hack(js): bump codemod test timeout (#9361)
Browse files Browse the repository at this point in the history
### Description

I have tried 5 times to cut a release. Temporarily bumping these so I
can get one out.

See
https://github.com/vercel/turborepo/actions/runs/11619011909/job/32359529053

### Testing Instructions

👀
  • Loading branch information
chris-olszewski authored Oct 31, 2024
1 parent b1479dd commit f4059b4
Showing 1 changed file with 41 additions and 37 deletions.
78 changes: 41 additions & 37 deletions packages/turbo-codemod/__tests__/get-turbo-upgrade-command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ describe("get-turbo-upgrade-command", () => {
mockedExec.mockRestore();
mockGetAvailablePackageManagers.mockRestore();
mockGetWorkspaceDetails.mockRestore();
});
}, 10000);

it.each([
{
Expand All @@ -612,47 +612,51 @@ describe("get-turbo-upgrade-command", () => {
fixture: "no-deps",
name: "fails gracefully if package.json has no deps or devDeps",
},
])("$name", async ({ fixture }) => {
const { root } = useFixture({
fixture,
});

const mockedExec = jest
.spyOn(utils, "exec")
.mockImplementation((command: string) => {
// fail the check for the turbo to force local
if (command.includes("bin")) {
return undefined;
}
])(
"$name",
async ({ fixture }) => {
const { root } = useFixture({
fixture,
});

const mockGetAvailablePackageManagers = jest
.spyOn(turboUtils, "getAvailablePackageManagers")
.mockResolvedValue({
pnpm: "8.0.0",
npm: undefined,
yarn: undefined,
bun: undefined,
const mockedExec = jest
.spyOn(utils, "exec")
.mockImplementation((command: string) => {
// fail the check for the turbo to force local
if (command.includes("bin")) {
return undefined;
}
});

const mockGetAvailablePackageManagers = jest
.spyOn(turboUtils, "getAvailablePackageManagers")
.mockResolvedValue({
pnpm: "8.0.0",
npm: undefined,
yarn: undefined,
bun: undefined,
});

const project = getWorkspaceDetailsMockReturnValue({
root,
packageManager: "pnpm",
});
const mockGetWorkspaceDetails = jest
.spyOn(turboWorkspaces, "getWorkspaceDetails")
.mockResolvedValue(project);

const project = getWorkspaceDetailsMockReturnValue({
root,
packageManager: "pnpm",
});
const mockGetWorkspaceDetails = jest
.spyOn(turboWorkspaces, "getWorkspaceDetails")
.mockResolvedValue(project);

// get the command
const upgradeCommand = await getTurboUpgradeCommand({
project,
});
// get the command
const upgradeCommand = await getTurboUpgradeCommand({
project,
});

expect(upgradeCommand).toEqual(undefined);
expect(upgradeCommand).toEqual(undefined);

mockedExec.mockRestore();
mockGetAvailablePackageManagers.mockRestore();
mockGetWorkspaceDetails.mockRestore();
});
mockedExec.mockRestore();
mockGetAvailablePackageManagers.mockRestore();
mockGetWorkspaceDetails.mockRestore();
},
10000
);
});
});

0 comments on commit f4059b4

Please sign in to comment.