From 5e00128775701d7e1c613d446a5b70165a9f796b Mon Sep 17 00:00:00 2001 From: Zach Bloomquist Date: Wed, 10 Nov 2021 12:47:56 -0500 Subject: [PATCH] fix: ignore ENOENT on recursive rmdir in Node 16, this throws an error if `folderName` DNE https://github.com/nodejs/node/pull/37216 --- examples/testing-dom__download/cypress/plugins/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/testing-dom__download/cypress/plugins/index.js b/examples/testing-dom__download/cypress/plugins/index.js index 995f1da..8c6edbb 100644 --- a/examples/testing-dom__download/cypress/plugins/index.js +++ b/examples/testing-dom__download/cypress/plugins/index.js @@ -116,7 +116,7 @@ module.exports = (on, config) => { return new Promise((resolve, reject) => { rmdir(folderName, { maxRetries: 10, recursive: true }, (err) => { - if (err) { + if (err && err.code !== 'ENOENT') { console.error(err) return reject(err)