From 2336f87063486fb8dd65b00cbc73e530a3eec178 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 10 Jan 2022 11:54:50 +0200 Subject: [PATCH 1/3] chore(tests): remove `util.promisify` --- tests/command.deploy.test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/command.deploy.test.js b/tests/command.deploy.test.js index bf2510f92dc..5da7d86d186 100644 --- a/tests/command.deploy.test.js +++ b/tests/command.deploy.test.js @@ -364,8 +364,7 @@ if (process.env.NETLIFY_TEST_DISABLE_LIVE !== 'true') { plugin: { onPreBuild: async ({ netlifyConfig }) => { // eslint-disable-next-line node/global-require - const [fs, util] = [require('fs'), require('util')] - const [writeFile, mkdir] = [fs.writeFile, fs.mkdir].map(util.promisify) + const { mkdir, writeFile } = require('fs').promises const generatedFunctionsDir = 'new_functions' netlifyConfig.functions.directory = generatedFunctionsDir From 224563a41a1b56db7f5a07dcbde11fbfa52667ce Mon Sep 17 00:00:00 2001 From: erezrokah Date: Wed, 12 Jan 2022 16:59:52 +0100 Subject: [PATCH 2/3] test: add always passing test --- tests/command.deploy.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/command.deploy.test.js b/tests/command.deploy.test.js index 5da7d86d186..e9e21758fc3 100644 --- a/tests/command.deploy.test.js +++ b/tests/command.deploy.test.js @@ -747,4 +747,8 @@ if (process.env.NETLIFY_TEST_DISABLE_LIVE !== 'true') { await callCli(['sites:delete', siteId, '--force']) }) } + +test('always pass, used for forked PRs', (t) => { + t.pass() +}) /* eslint-enable require-await */ From fe660c46ede14ae56db7a11e7c19bfc1c4798978 Mon Sep 17 00:00:00 2001 From: erezrokah Date: Wed, 12 Jan 2022 17:02:38 +0100 Subject: [PATCH 3/3] chore: clarify test name --- tests/command.deploy.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/command.deploy.test.js b/tests/command.deploy.test.js index e9e21758fc3..99c5fb4eb58 100644 --- a/tests/command.deploy.test.js +++ b/tests/command.deploy.test.js @@ -748,7 +748,7 @@ if (process.env.NETLIFY_TEST_DISABLE_LIVE !== 'true') { }) } -test('always pass, used for forked PRs', (t) => { +test('always pass, used for forked PRs since ava fails when no tests are present', (t) => { t.pass() }) /* eslint-enable require-await */