fix: mocha テストが動かないのを修正 v2 (#8892)

* on push

* Fix mute test

* fix note test

* api

* inc timeout

* uploadUrl

* Revert "on push"

This reverts commit 778a58df61ff9a22421f8ec5dcce96b364eab38d.

* lint

* waitFire

* Wrap connectStream

* return
This commit is contained in:
MeiMei
2022-06-26 19:16:32 +09:00
committed by GitHub
parent 4634920866
commit f834d6a813
6 changed files with 157 additions and 74 deletions

View File

@ -7,6 +7,8 @@ import { IEndpointMeta } from './endpoints.js';
const logger = new Logger('limiter');
export const limiter = (limitation: IEndpointMeta['limit'] & { key: NonNullable<string> }, actor: string) => new Promise<void>((ok, reject) => {
if (process.env.NODE_ENV === 'test') ok();
const hasShortTermLimit = typeof limitation.minInterval === 'number';
const hasLongTermLimit =