From a2dc8eedd2e2f351bcb8bd7b27e389b5a931f895 Mon Sep 17 00:00:00 2001 From: Juan Escalada <97265671+jescalada@users.noreply.github.com> Date: Sun, 23 Mar 2025 04:04:26 +0000 Subject: [PATCH] fix: clean up .remote folder after tests and extend timeout --- test/testClearBareClone.test.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/test/testClearBareClone.test.js b/test/testClearBareClone.test.js index b01aae621..ea3384062 100644 --- a/test/testClearBareClone.test.js +++ b/test/testClearBareClone.test.js @@ -25,7 +25,7 @@ describe('clear bare and local clones', async () => { ); expect(fs.existsSync(`./.remote/${timestamp}`)).to.be.true; - }).timeout(10000); + }).timeout(20000); it('clear bare clone function purges .remote folder and specific clone folder', async () => { const action = new Action('123', 'type', 'get', timestamp, 'finos/git-proxy'); @@ -33,4 +33,10 @@ describe('clear bare and local clones', async () => { expect(fs.existsSync(`./.remote`)).to.throw; expect(fs.existsSync(`./.remote/${timestamp}`)).to.throw; }); + + afterEach(() => { + if (fs.existsSync(`./.remote`)) { + fs.rmdirSync(`./.remote`, { recursive: true }); + } + }) });