summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
authorzyoshoka <107108195+zyoshoka@users.noreply.github.com>2024-07-02 10:57:20 +0900
committerGitHub <noreply@github.com>2024-07-02 10:57:20 +0900
commitf1b1e2a7cca3d69eb6162d4c16746968d855ea40 (patch)
tree9ca92f0f3a73d4f20d9f742c2bcea4e8981b9620 /packages/frontend/src/scripts
parentchore(docker-compose): 推奨の名前にする (#14096) (diff)
downloadsharkey-f1b1e2a7cca3d69eb6162d4c16746968d855ea40.tar.gz
sharkey-f1b1e2a7cca3d69eb6162d4c16746968d855ea40.tar.bz2
sharkey-f1b1e2a7cca3d69eb6162d4c16746968d855ea40.zip
fix(storybook): prevent infinite remount of component (#14101)
* fix(storybook): prevent infinite remount of component * fix: disable flaky `.toMatch()` test
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/test-utils.ts10
1 files changed, 0 insertions, 10 deletions
diff --git a/packages/frontend/src/scripts/test-utils.ts b/packages/frontend/src/scripts/test-utils.ts
index a32315f4df..52bb2d94e0 100644
--- a/packages/frontend/src/scripts/test-utils.ts
+++ b/packages/frontend/src/scripts/test-utils.ts
@@ -7,13 +7,3 @@ export async function tick(): Promise<void> {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
await new Promise((globalThis.requestIdleCallback ?? setTimeout) as never);
}
-
-/**
- * @see https://github.com/misskey-dev/misskey/issues/11267
- */
-export function semaphore(counter = 0, waiting: (() => void)[] = []) {
- return {
- acquire: () => ++counter > 1 && new Promise<void>(resolve => waiting.push(resolve)),
- release: () => --counter && waiting.pop()?.(),
- };
-}