Skip to content

Commit ad344f4

Browse files
Fix formatting
1 parent 1dbbee4 commit ad344f4

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

lib/Auth.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,9 @@ export const AuthenticationOptions: AuthOptions = {
112112
let typedUser = user as Partial<User>;
113113
if (!typedUser.slug || typedUser._id?.toString() != typedUser.id) {
114114
const repairUserOnceItIsInDb = async () => {
115-
console.log("User is incomplete, waiting for it to be in the database.");
115+
console.log(
116+
"User is incomplete, waiting for it to be in the database.",
117+
);
116118
let foundUser: User | undefined = undefined;
117119
while (!foundUser) {
118120
foundUser = await (
@@ -132,7 +134,7 @@ export const AuthenticationOptions: AuthOptions = {
132134
typedUser = await repairUser(await db, typedUser);
133135

134136
console.log("User updated:", typedUser);
135-
}
137+
};
136138

137139
repairUserOnceItIsInDb();
138140
}

tests/lib/client/ClientUtils.test.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ test(`${promisify.name}: Rejects`, async () => {
7979
describe(wait.name, () => {
8080
test("Waits for at least the specified time", async () => {
8181
const durations = [10, 50, 100, 500, 1000];
82-
82+
8383
for (const duration of durations) {
8484
const start = Date.now();
8585
await wait(duration);
@@ -91,17 +91,19 @@ describe(wait.name, () => {
9191
test("Waits for at most the specified time", async () => {
9292
const durations = [10, 50, 100, 500, 1000];
9393
const iterations = 10;
94-
94+
9595
// The value of each trial is how much it overshot the duration
9696
const trials: Promise<number>[] = [];
9797
for (let i = 0; i < iterations; i++) {
9898
for (const duration of durations) {
99-
trials.push((async () => {
100-
const start = Date.now();
101-
await wait(duration);
102-
const end = Date.now();
103-
return end - start - duration;
104-
})());
99+
trials.push(
100+
(async () => {
101+
const start = Date.now();
102+
await wait(duration);
103+
const end = Date.now();
104+
return end - start - duration;
105+
})(),
106+
);
105107
}
106108
}
107109

@@ -110,4 +112,4 @@ describe(wait.name, () => {
110112
expect(result).toBeLessThanOrEqual(20);
111113
}
112114
});
113-
});
115+
});

0 commit comments

Comments
 (0)