fix ca trust test and snek high score

This commit is contained in:
Matt Hill
2024-06-25 10:54:09 -06:00
parent 8009dd691b
commit 0c188f6d10
7 changed files with 31 additions and 10 deletions

View File

@@ -118,7 +118,17 @@ export class MockApiService extends ApiService {
}
}
// server state
// state
async echo(params: RR.EchoReq, url: string): Promise<RR.EchoRes> {
if (url) {
const num = Math.floor(Math.random() * 10) + 1
if (num > 8) return params.message
throw new Error()
}
await pauseFor(2000)
return params.message
}
private stateIndex = 0
async getState(): Promise<RR.ServerState> {