From f6ea13c47bdc51aa63659b3494240aee4636e05d Mon Sep 17 00:00:00 2001 From: nkomonen Date: Thu, 22 Feb 2024 20:55:21 -0500 Subject: [PATCH] test: get better understanding of flaky test This test is flaky and sometimes fails in CI where the spy shows that the method was invoked 2 times, when it should have been 1 time. Instead test against the actual args and then we should hopefully get more information regarding who is causing the second call. Signed-off-by: nkomonen --- packages/toolkit/src/test/srcShared/fs.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/toolkit/src/test/srcShared/fs.test.ts b/packages/toolkit/src/test/srcShared/fs.test.ts index c17ca4a2c89..bc4ee57e8cf 100644 --- a/packages/toolkit/src/test/srcShared/fs.test.ts +++ b/packages/toolkit/src/test/srcShared/fs.test.ts @@ -176,7 +176,7 @@ describe('FileSystem', function () { await fsCommon.mkdir(dirPath) assert(existsSync(dirPath)) - assert.strictEqual(mkdirSpy.callCount, 1) + assert.deepStrictEqual(mkdirSpy.args, [[dirPath, { recursive: true }]]) }) }) })