- set server config query `staleTime` to `Infinity` to avoid unnecessary refetches - narrow `isWindowsPlatform` matching to Windows-prefixed identifiers - add unit tests for Windows and non-Windows platform cases
16 lines
437 B
TypeScript
16 lines
437 B
TypeScript
import { assert, describe, it } from "vitest";
|
|
|
|
import { isWindowsPlatform } from "./utils";
|
|
|
|
describe("isWindowsPlatform", () => {
|
|
it("matches Windows platform identifiers", () => {
|
|
assert.isTrue(isWindowsPlatform("Win32"));
|
|
assert.isTrue(isWindowsPlatform("Windows"));
|
|
assert.isTrue(isWindowsPlatform("windows_nt"));
|
|
});
|
|
|
|
it("does not match darwin", () => {
|
|
assert.isFalse(isWindowsPlatform("darwin"));
|
|
});
|
|
});
|