mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
add close method to policyworker for testing purposes
This commit is contained in:
parent
42f581d350
commit
e1d4a00a93
2 changed files with 8 additions and 0 deletions
|
|
@ -86,4 +86,8 @@ export class PolicyWorker implements NPolicy {
|
|||
throw new Error(`DITTO_POLICY (error importing policy): ${conf.policy}`);
|
||||
}
|
||||
}
|
||||
|
||||
[Symbol.dispose]() {
|
||||
this.worker.close();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,6 +85,10 @@ export class CustomPolicy implements NPolicy {
|
|||
|
||||
this.policy = new PipePolicy(policies);
|
||||
}
|
||||
|
||||
close() {
|
||||
self.close();
|
||||
}
|
||||
}
|
||||
|
||||
Comlink.expose(new CustomPolicy());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue