[ci] format

This commit is contained in:
lilnasy 2023-09-28 17:19:21 +00:00 committed by astrobot-houston
parent cfd895d877
commit c4c616c0a5
2 changed files with 26 additions and 27 deletions

View file

@ -6,12 +6,12 @@ for (const caseNumber of [ 1, 2, 3, 4 ]) {
/** @type Awaited<ReturnType<typeof loadFixture>> */
let fixture;
/** @type Awaited<ReturnType<typeof fixture['startDevServer']>> */
let devServer
let devServer;
before(async () => {
fixture = await loadFixture({
root: `./fixtures/custom-404-loop-case-${caseNumber}/`,
site: 'http://example.com'
site: 'http://example.com',
});
devServer = await fixture.startDevServer();
@ -38,10 +38,9 @@ for (const caseNumber of [ 1, 2, 3, 4 ]) {
});
}
/***** UTILITY FUNCTIONS *****/
const timeout = Symbol("timeout")
const timeout = Symbol('timeout');
/** @template Res */
function withTimeout(
@ -51,7 +50,7 @@ function withTimeout(
timeLimit
) {
/** @type Promise<typeof timeout> */
const timeoutPromise = new Promise(resolve => setTimeout(() => resolve(timeout), timeLimit))
const timeoutPromise = new Promise((resolve) => setTimeout(() => resolve(timeout), timeLimit));
return Promise.race([responsePromise, timeoutPromise]);
}