Skip to content
Snippets Groups Projects
Unverified Commit 3b30ee31 authored by Acid Chicken (硫酸鶏)'s avatar Acid Chicken (硫酸鶏) Committed by GitHub
Browse files

test: fix vitest

parent f6830885
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment