diff --git a/.oxlintrc.json b/.oxlintrc.json index dba38dc6e7..3868ce72a6 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -35,7 +35,7 @@ "vitest/expect-expect": "off", "vitest/no-disabled-tests": "off", "vitest/require-mock-type-parameters": "off", - "vitest/require-to-throw-message": "off", + "vitest/require-to-throw-message": "error", "import/no-duplicates": [ "warn", { diff --git a/src/application/ClientConfigurationToml.test.ts b/src/application/ClientConfigurationToml.test.ts index 2e4d292157..96522a1079 100644 --- a/src/application/ClientConfigurationToml.test.ts +++ b/src/application/ClientConfigurationToml.test.ts @@ -33,7 +33,10 @@ describe("parseClientToml", () => { }); it("rejects malformed TOML syntax", () => { - expect(() => parseClientToml("[unterminated\nkey = 1\n")).toThrow(); + // smol-toml reports where the unterminated table header stops parsing. + expect(() => parseClientToml("[unterminated\nkey = 1\n")).toThrow( + expect.objectContaining({ line: 1, column: 14 }), + ); }); }); diff --git a/src/desktop/DconfDatabaseReader.test.ts b/src/desktop/DconfDatabaseReader.test.ts index 260cb008e4..389b572ed9 100644 --- a/src/desktop/DconfDatabaseReader.test.ts +++ b/src/desktop/DconfDatabaseReader.test.ts @@ -122,6 +122,7 @@ it.skipIf(process.platform !== "linux").each([false, true])( const selected = closeFault.handles.at(-1); if (selected === undefined) throw new Error("Missing database descriptor"); first.allow(); + // oxlint-disable-next-line vitest/require-to-throw-message -- Linux-only fixture; its retry refusal has not been observed, and the lease state below is the asserted fact. await expect(failure.cleanupLease.release()).rejects.toThrow(); expect(failure.cleanupLease.released).toBe(false); await expect(first.handle.stat()).rejects.toMatchObject({ code: "EBADF" }); diff --git a/tests/boundary/pcap/pcapProviderCrossPlatform.test.ts b/tests/boundary/pcap/pcapProviderCrossPlatform.test.ts index 3f8d50cda5..b1c450becb 100644 --- a/tests/boundary/pcap/pcapProviderCrossPlatform.test.ts +++ b/tests/boundary/pcap/pcapProviderCrossPlatform.test.ts @@ -781,6 +781,7 @@ it.skipIf(!hasNativeBound)( expect(result.error.cleanupIncomplete).toBe(true); // Releasing only the snapshot leaves the primary cleanup failure open. + // oxlint-disable-next-line vitest/require-to-throw-message -- needs a native capture bound to observe the refusal; the cleanup facts below are the asserted ones. await expect(provider.close()).rejects.toThrow(); expect(result.error.cleanupResources).toEqual([resolvedCapinfos]); expect(result.error.cleanupIncomplete).toBe(true);