From 3e769916ece9c73041dbb4e2374eea5914e00304 Mon Sep 17 00:00:00 2001 From: Or Rosenblatt Date: Sat, 26 Oct 2024 02:29:44 -0400 Subject: [PATCH] test: update integration test with the new options --- src/test/ts/runner.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/test/ts/runner.ts b/src/test/ts/runner.ts index 1d118a6..dc950d8 100644 --- a/src/test/ts/runner.ts +++ b/src/test/ts/runner.ts @@ -26,6 +26,8 @@ const noop = () => { } const fixtures = resolve(__dirname, '../fixtures/') const registryUrl = 'https://example.com' +const dependency = 'example-package' +const scopedDependency = '@scope/package' const strMatching = (start = '', end = '') => expect.stringMatching(new RegExp(`^${start}.+${end}$`)) const readFixture = (name: string): string => @@ -184,6 +186,10 @@ describe('yarn-audit-fix', () => { '--verbose', '--registry', registryUrl, + '--exclude', + dependency, + '--exclude', + scopedDependency, '--prefix', expect.stringMatching(temp), ].filter((v) => v !== undefined), @@ -241,7 +247,7 @@ describe('yarn-audit-fix', () => { it('invokes cmd queue with proper args', async () => { await run({ flow: 'patch', - temp + temp, }) checkTempAssets() @@ -282,6 +288,7 @@ describe('yarn-audit-fix', () => { 'package-lock-only': true, registry: registryUrl, flow: 'convert', + exclude: [dependency, scopedDependency], ignoreEngines: true, temp, }) @@ -315,6 +322,8 @@ describe('yarn-audit-fix', () => { '--package-lock-only=false', `--registry=${registryUrl}`, '--flow=convert', + `--exclude=${dependency}`, + `--exclude=${scopedDependency}`, '--ignore-engines', ) await reimport('../../main/ts/cli')