formatting

This commit is contained in:
2026-08-10 04:02:41 +00:00
parent 6f6bddf560
commit 04e61b7208
2 changed files with 8 additions and 9 deletions
+4 -6
View File
@@ -308,7 +308,7 @@ const testExponentialBackoffRunDelayAbortedWhenAbortSignal = async (): Promise<v
try {
let abort: (reason: unknown) => void;
const taskFn = vi.fn(async ({ stopRetries }) => {
const taskFn = vi.fn(async ({ stopRetries }) => {
abort = stopRetries;
throw new Error('error message');
});
@@ -328,8 +328,7 @@ const testExponentialBackoffRunDelayAbortedWhenAbortSignal = async (): Promise<v
throw new Error('abort is not defined');
}
// Check that the rsult is still pending
expect(result).not.resolves;
// Check that the abort function is defined
expect(abort).toBeDefined();
// Abort the exponential backoff
@@ -337,11 +336,11 @@ const testExponentialBackoffRunDelayAbortedWhenAbortSignal = async (): Promise<v
// Expect the result to be rejected with an ExponentialBackoffStoppedRetriesError
await expect(result).rejects.toThrow(ExponentialBackoffStoppedRetriesError);
}
finally {
} finally {
vi.useRealTimers();
}
};
/**
* Tests the {@link ExponentialBackoff.from} factory and subsequent instance {@link ExponentialBackoff.run}
* as an alternative to the static helper.
@@ -629,7 +628,6 @@ const testExponentialBackoffValidateOptionsRejectsNaN = (): void => {
}
};
/** Tests that passing undefined into the constructor does not cause an error during spread */
const testExponentialBackoffConstructorDoesNotCauseErrorDuringSpread = async (): Promise<void> => {
const options = {