mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-11-23 08:46:56 +01:00
test: fix vitest
This commit is contained in:
parent
f6830885d7
commit
3b30ee3130
1 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,11 @@ import { WorkerMultiDispatch } from '@/scripts/worker-multi-dispatch';
|
|||
import { extractAvgColorFromBlurhash } from '@/scripts/extract-avg-color-from-blurhash';
|
||||
|
||||
const workerPromise = new Promise<WorkerMultiDispatch | null>(resolve => {
|
||||
// テスト環境で Web Worker インスタンスは作成できない
|
||||
if (import.meta.env.MODE === 'test') {
|
||||
resolve(null);
|
||||
return;
|
||||
}
|
||||
const testWorker = new TestWebGL2();
|
||||
testWorker.addEventListener('message', event => {
|
||||
if (event.data.result) {
|
||||
|
|
Loading…
Reference in a new issue