Add rush command wrapper and tests

This commit is contained in:
James McMeeking 2026-04-02 12:31:02 +01:00
parent 308ccb3d2b
commit 5690e55d99
No known key found for this signature in database
GPG key ID: C69A11061EE15228
12 changed files with 403 additions and 7 deletions

View file

@ -48,6 +48,12 @@ export const knownAikidoTools = [
ecoSystem: ECOSYSTEM_JS,
internalPackageManagerName: "pnpx",
},
{
tool: "rush",
aikidoCommand: "aikido-rush",
ecoSystem: ECOSYSTEM_JS,
internalPackageManagerName: "rush",
},
{
tool: "bun",
aikidoCommand: "aikido-bun",

View file

@ -48,8 +48,9 @@ describe("Setup CI shell integration", () => {
knownAikidoTools: [
{ tool: "npm", aikidoCommand: "aikido-npm" },
{ tool: "yarn", aikidoCommand: "aikido-yarn" },
{ tool: "rush", aikidoCommand: "aikido-rush" },
],
getPackageManagerList: () => "npm, yarn",
getPackageManagerList: () => "npm, yarn, rush",
getShimsDir: () => mockShimsDir,
},
});
@ -115,6 +116,10 @@ describe("Setup CI shell integration", () => {
const yarnShimPath = path.join(mockShimsDir, "yarn");
assert.ok(fs.existsSync(yarnShimPath), "yarn shim should exist");
// Check if rush shim was created
const rushShimPath = path.join(mockShimsDir, "rush");
assert.ok(fs.existsSync(rushShimPath), "rush shim should exist");
// Check content of npm shim
const npmShimContent = fs.readFileSync(npmShimPath, "utf-8");
assert.ok(npmShimContent.includes("aikido-npm"), "npm shim should contain aikido-npm");
@ -137,6 +142,9 @@ describe("Setup CI shell integration", () => {
const yarnShimPath = path.join(mockShimsDir, "yarn.cmd");
assert.ok(fs.existsSync(yarnShimPath), "yarn.cmd shim should exist");
const rushShimPath = path.join(mockShimsDir, "rush.cmd");
assert.ok(fs.existsSync(rushShimPath), "rush.cmd shim should exist");
// Check content of npm.cmd shim
const npmShimContent = fs.readFileSync(npmShimPath, "utf-8");
assert.ok(npmShimContent.includes("aikido-npm"), "npm.cmd should contain aikido-npm");