chore(tests): fix unneeded async (#1021)

Removes an unneeded `check eventually` inside a helper proc, removing the need for the proc to be async.
This commit is contained in:
Eric 2024-12-06 15:02:57 +07:00 committed by GitHub
parent f51eae30fe
commit fb4577f25c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -189,14 +189,16 @@ asyncchecksuite "Sales":
await repoTmp.destroyDb()
await metaTmp.destroyDb()
proc isInState(idx: int, state: string): Future[bool] {.async.} =
proc isInState(idx: int, state: string): bool =
proc description(state: State): string =
$state
check eventually sales.agents.len > idx
if idx >= sales.agents.len:
return false
sales.agents[idx].query(description) == state.some
proc allowRequestToStart {.async.} =
check eventually (await isInState(0, "SaleInitialProving"))
check eventually isInState(0, "SaleInitialProving")
# it won't start proving until the next period
await clock.advanceToNextPeriod(market)