Add tests

This commit is contained in:
Cooldude2606 committed 2026-05-29 17:45:14 +01:00
1 parent 4676f1c820
commit 41222343e3
3 files changed
+1232 -706

No files matched your search

+5 -3
View File
@@ -114,12 +114,13 @@ export class SubscriptionFilters {
* Subtracting a filter accepting all produces an empty filter.
*/
subtract(other: this) {
if (this._all) {
return; // Cannot subtract from all
}
if (other._all) {
this._all = false;
this._filters.clear();
return;
}
if (this._all) {
return; // Cannot subtract from all
}
for (const filter of other._filters) {
this._filters.delete(filter);
@@ -366,6 +367,7 @@ export class SubscriptionController {
} else {
subscriber.filters = request.filters;
}
break;
default:
throw new Error(`unreachable case: ${String(request.action)}`);