From 0c407735e44e3f8cc04fa674931fc6f2de1898d1 Mon Sep 17 00:00:00 2001 From: Dhai Date: Thu, 26 Dec 2024 08:45:21 +0530 Subject: [PATCH] fix tests --- packages/create-fuels/test/cli.test.ts | 5 ++++- packages/create-fuels/test/utils/generateArgs.ts | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/create-fuels/test/cli.test.ts b/packages/create-fuels/test/cli.test.ts index a58965b876b..9c391e8a36e 100644 --- a/packages/create-fuels/test/cli.test.ts +++ b/packages/create-fuels/test/cli.test.ts @@ -93,9 +93,10 @@ describe('CLI', { timeout: 15_000 }, () => { }); test('should rewrite for the appropriate package manager', async () => { + process.env.npm_config_user_agent = 'bun'; + const args = generateArgv({ projectName: paths.projectRoot, - packageManager: 'bun', template: paths.templateName, }); @@ -114,6 +115,8 @@ describe('CLI', { timeout: 15_000 }, () => { const readme = readFileSync(readmePath, 'utf-8'); expect(readme).toContain('bun run fuels:dev'); expect(readme).toContain('bun run dev'); + + delete process.env.npm_config_user_agent; }); test('create-fuels reports an error if the project directory already exists', async () => { diff --git a/packages/create-fuels/test/utils/generateArgs.ts b/packages/create-fuels/test/utils/generateArgs.ts index afd7a69cfbb..17bf80dd302 100644 --- a/packages/create-fuels/test/utils/generateArgs.ts +++ b/packages/create-fuels/test/utils/generateArgs.ts @@ -18,7 +18,6 @@ export const generateArgs = ({ args.push(`--template`); args.push(template); } - args.push(`--${packageManager}`); args.push(`--no-install`); return args; };