MCPcopy
hub / github.com/vitest-dev/vitest / testSelfWorker

Function testSelfWorker

test/core/test/web-worker-node.test.ts:163–169  ·  view source on GitHub ↗
(worker: Worker)

Source from the content-addressed store, hash-verified

161}
162
163function testSelfWorker(worker: Worker) {
164 return new Promise<boolean>((resolve) => {
165 worker.onmessage = (e) => {
166 resolve(e.data)
167 }
168 })
169}
170
171it('worker exists', async () => {
172 expect(Worker).toBeDefined()

Callers 1

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected