From a41b0416a549c831456b6385ba2f60b3f6ba3caa Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Fri, 27 Oct 2023 13:15:37 +0200 Subject: [PATCH] update test --- .../bin/eslint.config-promise-tick-throws.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tests/fixtures/bin/eslint.config-promise-tick-throws.js b/tests/fixtures/bin/eslint.config-promise-tick-throws.js index 36395f13a5c..6ea53d25386 100644 --- a/tests/fixtures/bin/eslint.config-promise-tick-throws.js +++ b/tests/fixtures/bin/eslint.config-promise-tick-throws.js @@ -6,8 +6,17 @@ function throwError() { process.nextTick(throwError); +function delay(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); +} + +async function getConfig() { + await delay(100); + return []; +} + /* - * Promise ensures that this config must be await-ed and therefore + * Exporting the config as an initially unsettled Promise should ensure that * the error in next tick will be thrown before any linting is done */ -module.exports = Promise.resolve([{}]); +module.exports = getConfig();