mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-06 17:08:10 +00:00
fix(frontend): remove unused MockWS constructor param (#904)
The `_url` parameter on the test-only MockWS class was unused, and ESLint's no-unused-vars rule does not honor the underscore-prefix convention in this project's config, so the lint job failed. The mock is installed via vi.stubGlobal at runtime, so dropping the parameter is safe — JS still permits callers to pass a url argument.
This commit is contained in:
@@ -12,7 +12,7 @@ class MockWS {
|
||||
readyState = 1;
|
||||
send = vi.fn();
|
||||
close = vi.fn();
|
||||
constructor(_url: string) { MockWS.instances.push(this); }
|
||||
constructor() { MockWS.instances.push(this); }
|
||||
static reset() { MockWS.instances = []; }
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class MockWS {
|
||||
readyState = 1; // OPEN
|
||||
send = vi.fn();
|
||||
close = vi.fn();
|
||||
constructor(_url: string) { MockWS.instances.push(this); }
|
||||
constructor() { MockWS.instances.push(this); }
|
||||
static reset() { MockWS.instances = []; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user