From 44479552bc5d6f017b495b09b1a4f9d6f579da5b Mon Sep 17 00:00:00 2001 From: manushak Date: Fri, 6 Dec 2024 13:03:47 +0400 Subject: [PATCH] test(util): fix if-check unit test --- src/__tests__/if-check/util/npm.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/__tests__/if-check/util/npm.test.ts b/src/__tests__/if-check/util/npm.test.ts index b418cb0d..d7b4d798 100644 --- a/src/__tests__/if-check/util/npm.test.ts +++ b/src/__tests__/if-check/util/npm.test.ts @@ -30,7 +30,9 @@ jest.mock('child_process', () => { 'npm run if-run -- -m ./src/__mocks__/mock-manifest.yaml -o src/__mocks__/re-mock-manifest', 'node -p Boolean(process.stdout.isTTY)', 'npm run if-diff -- -s src/__mocks__/re-mock-manifest.yaml -t ./src/__mocks__/mock-manifest.yaml', - ].includes(`${file} ${args.join(' ')}`) + ].includes( + Array.isArray(args) ? `${file} ${args.join(' ')}` : file.trim() + ) ).toBeTruthy(); break; }