aboutsummaryrefslogtreecommitdiff
path: root/e2e/eventually.ts
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-04-13 20:37:36 +0900
committerShin'ya Ueoka <ueokande@i-beam.org>2020-04-13 20:37:36 +0900
commite1dac618a8b8929f601c7ec8aca3842c5ebf9d03 (patch)
tree6a914a8243c8c02e7752a83667a54d3fa832955c /e2e/eventually.ts
parent685f2b7b69218b06b5bb676069e35f79c5048c9b (diff)
Use plugin:prettier/recommended
Diffstat (limited to 'e2e/eventually.ts')
-rw-r--r--e2e/eventually.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/e2e/eventually.ts b/e2e/eventually.ts
index b0a2dfc..9d21022 100644
--- a/e2e/eventually.ts
+++ b/e2e/eventually.ts
@@ -1,19 +1,19 @@
const defaultInterval = 100;
const defaultTimeout = 2000;
-type Handler = () => void
+type Handler = () => void;
const sleep = (ms: number): Promise<void> => {
- return new Promise(resolve => setTimeout(resolve, ms));
-}
-
+ return new Promise((resolve) => setTimeout(resolve, ms));
+};
+
const eventually = async (
fn: Handler,
timeout = defaultTimeout,
- interval = defaultInterval,
+ interval = defaultInterval
): Promise<void> => {
const start = Date.now();
- const loop = async() => {
+ const loop = async () => {
try {
await fn();
} catch (err) {