mirror of
https://github.com/HeyPuter/puter.git
synced 2026-11-06 14:07:51 +00:00
test(realtime): isolate credential attempt budgets between cases
This commit is contained in:
1 parent
1ab1c04760
commit
2832926f8d
1 file changed
+5
-1
@@ -210,7 +210,11 @@ describe('OpenAIRealtimeRelayService relay', () => {
|
||||
|
||||
// Realtime is subscriber-only; the test user is on a paid plan with a $10
|
||||
// allowance unless a test says otherwise.
|
||||
beforeEach(() => {
|
||||
beforeEach(async () => {
|
||||
const row = await server.stores.user.getByUsername(user.username);
|
||||
user.token = (
|
||||
await server.services.auth.createSessionToken(row!, {})
|
||||
).token;
|
||||
const metering = server.services.metering;
|
||||
const plan = metering.getActorSubscription.bind(metering);
|
||||
vi.spyOn(metering, 'getActorSubscription').mockImplementation(
|
||||
|
||||
Reference in new issue
Block a user