Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Oct 27, 2023
1 parent ff6917e commit a41b041
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions tests/fixtures/bin/eslint.config-promise-tick-throws.js
Expand Up @@ -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();

0 comments on commit a41b041

Please sign in to comment.