From 870f4943bfdd04da715efa35b03d5fa8cf8615d3 Mon Sep 17 00:00:00 2001 From: nkomonen Date: Tue, 13 Feb 2024 15:27:12 -0500 Subject: [PATCH] test: try fix flaky test Not sure if this fixes #4390, but we now reuse the same sandbox instead of recreating it each time. We were failing a test where a spied method was being called more than expected. 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 217aa1a01ec..9053e848ed0 100644 --- a/packages/toolkit/src/test/srcShared/fs.test.ts +++ b/packages/toolkit/src/test/srcShared/fs.test.ts @@ -24,12 +24,12 @@ describe('FileSystem', function () { before(async function () { fakeContext = await FakeExtensionContext.create() + sandbox = Sinon.createSandbox() await deleteTestRoot() // incase a previous test run failed to clean }) beforeEach(async function () { await makeTestRoot() - sandbox = Sinon.createSandbox() }) afterEach(async function () {