1
0
Fork 0
mirror of https://github.com/codedread/bitjs synced 2025-10-03 17:49:16 +02:00

Add some unit tests for unarchivers. Provide a way to disconnect the impl from the host (for unit tests).

This commit is contained in:
Jeff Schiller 2023-12-16 15:28:37 -08:00
parent eba7042abe
commit cf26e0a2de
17 changed files with 211 additions and 13 deletions

View file

@ -16,6 +16,10 @@
let implPort;
onmessage = async (evt) => {
const module = await import(evt.data.implSrc);
module.connect(evt.ports[0]);
if (evt.data.implSrc) {
const module = await import(evt.data.implSrc);
module.connect(evt.ports[0]);
} else if (evt.data.disconnect) {
module.disconnect();
}
};