mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 00:13:13 +09:00
Better toString and test coverage
This commit is contained in:
2 files changed
+162
-69
No files matched your search
@@ -64,7 +64,13 @@ export class SubscriptionFilters {
|
||||
}
|
||||
|
||||
toString() {
|
||||
return `[SubscriptionFilters ${this._all ? "All" : String(this._filters)}]`;
|
||||
if (this._all) {
|
||||
return "[SubscriptionFilters All]";
|
||||
}
|
||||
if (this._filters.size === 0) {
|
||||
return "[SubscriptionFilters Empty]";
|
||||
}
|
||||
return `[SubscriptionFilters Set<${this._filters.size}>]`;
|
||||
}
|
||||
|
||||
/** Returns true if this filter accepts all the given filters */
|
||||
|
||||
Reference in new issue
Block a user