UBER-536: Fix test stability (#3466)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev
2023-06-29 11:46:28 +06:00
committed by GitHub
parent ee0754422d
commit cf2ca2ee27
7 changed files with 175 additions and 179 deletions
+6 -1
View File
@@ -357,7 +357,12 @@ export function devTool (
.action(async (email: string, cmd) => {
const { mongodbUri } = prepareTools()
return await withDatabase(mongodbUri, async (db) => {
await confirmEmail(db, email)
const account = await getAccount(db, email)
if (account?.confirmed === true) {
console.log(`Already confirmed:${email}`)
} else {
await confirmEmail(db, email)
}
})
})