mirror of
https://git.unlock-music.dev/um/um-react.git
synced 2024-11-27 17:42:16 +00:00
test: fix type for test
This commit is contained in:
parent
31420ac515
commit
c39d2edce7
@ -18,15 +18,16 @@ test('should be able to forward request to worker client bus', async () => {
|
|||||||
vi.spyOn(bus, 'request').mockImplementation(
|
vi.spyOn(bus, 'request').mockImplementation(
|
||||||
async (actionName: DECRYPTION_WORKER_ACTION_NAME, payload: unknown): Promise<unknown> => {
|
async (actionName: DECRYPTION_WORKER_ACTION_NAME, payload: unknown): Promise<unknown> => {
|
||||||
return { actionName, payload };
|
return { actionName, payload };
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
const queue = new DecryptionQueue(bus, 1);
|
const queue = new DecryptionQueue(bus, 1);
|
||||||
await expect(queue.add({ id: 'file://1', blobURI: 'blob://mock-file' })).resolves.toEqual({
|
await expect(queue.add({ id: 'file://1', blobURI: 'blob://mock-file', options: {} })).resolves.toEqual({
|
||||||
actionName: DECRYPTION_WORKER_ACTION_NAME.DECRYPT,
|
actionName: DECRYPTION_WORKER_ACTION_NAME.DECRYPT,
|
||||||
payload: {
|
payload: {
|
||||||
blobURI: 'blob://mock-file',
|
blobURI: 'blob://mock-file',
|
||||||
id: 'file://1',
|
id: 'file://1',
|
||||||
|
options: {},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user