From df4a611d3abad048027853630a3b7fba68f1fbd1 Mon Sep 17 00:00:00 2001 From: groenroos Date: Sat, 31 Jul 2021 21:43:26 +0100 Subject: [PATCH] Fix deprecation notice --- test/lib/Uploads.test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/lib/Uploads.test.js b/test/lib/Uploads.test.js index 41e48dd..2531913 100644 --- a/test/lib/Uploads.test.js +++ b/test/lib/Uploads.test.js @@ -460,5 +460,9 @@ test('does not process a non-file field in strict mode', async t => { test.after.always(t => { - fs.rmdirSync(path.join(__dirname, 'uploads'), { recursive: true }); + if (typeof fs.rmSync === 'function') { + fs.rmSync(path.join(__dirname, 'uploads'), { recursive: true }); + } else { + fs.rmdirSync(path.join(__dirname, 'uploads'), { recursive: true }); + } });