diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-06-02 14:24:44 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 00:24:44 -0400 |
commit | 3fe6bc1b82a10bed1d907b749b1cc200659df612 (patch) | |
tree | 02e14128039d015a7256494a50476f61785e6f33 /cli/tests/unit/request_test.ts | |
parent | 8b1b4766a1e747437a2b88fcadc26162a1bec640 (diff) |
fix: Better use of @ts-expect-error (#6038)
Diffstat (limited to 'cli/tests/unit/request_test.ts')
-rw-r--r-- | cli/tests/unit/request_test.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/cli/tests/unit/request_test.ts b/cli/tests/unit/request_test.ts index be6e956b7..24f5b6d82 100644 --- a/cli/tests/unit/request_test.ts +++ b/cli/tests/unit/request_test.ts @@ -10,22 +10,22 @@ unitTest(function fromInit(): void { }, }); - // @ts-expect-error - assertEquals("ahoyhoy", req._bodySource); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + assertEquals("ahoyhoy", (req as any)._bodySource); assertEquals(req.url, "https://example.com"); assertEquals(req.headers.get("test-header"), "value"); }); unitTest(function fromRequest(): void { const r = new Request("https://example.com"); - // @ts-expect-error - r._bodySource = "ahoyhoy"; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (r as any)._bodySource = "ahoyhoy"; r.headers.set("test-header", "value"); const req = new Request(r); - // @ts-expect-error - assertEquals(req._bodySource, r._bodySource); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + assertEquals((req as any)._bodySource, (r as any)._bodySource); assertEquals(req.url, r.url); assertEquals(req.headers.get("test-header"), r.headers.get("test-header")); }); @@ -44,6 +44,6 @@ unitTest(async function cloneRequestBodyStream(): Promise<void> { assertEquals(b1, b2); - // @ts-expect-error - assert(r1._bodySource !== r2._bodySource); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + assert((r1 as any)._bodySource !== (r2 as any)._bodySource); }); |