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:
parent
eba7042abe
commit
cf26e0a2de
17 changed files with 211 additions and 13 deletions
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue