test: working test with TypeScript + vite (using vitest)

This commit is contained in:
鲁树人
2023-05-17 01:46:20 +01:00
parent 863a4e4f89
commit 0db84813ad
19 changed files with 687 additions and 75 deletions

View File

@@ -6,7 +6,7 @@ import { DecryptionQueue } from '~/util/DecryptionQueue';
export const workerClient = new Worker(new URL('./worker', import.meta.url), { type: 'module' });
// FIXME: report the error so is obvious to the user.
workerClient.onerror = (err) => console.error(err);
workerClient.addEventListener('error', console.error);
export const workerClientBus = new WorkerClientBus<DECRYPTION_WORKER_ACTION_NAME>(workerClient);
export const decryptionQueue = new DecryptionQueue(workerClientBus);