mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 20:20:49 +00:00
Add rush command wrapper and tests
This commit is contained in:
parent
308ccb3d2b
commit
5690e55d99
12 changed files with 403 additions and 7 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue