Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixes/0000-windows-compression-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- **fix(tests):** Compression worker-pool and RTK TOML test assertions now cross-platform — worker specifier compares URL pathnames via `pathToFileURL`, and the 0600 permission check is POSIX-only. Both failures were Windows-only test bugs, not runtime regressions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import assert from "node:assert/strict";
import { EventEmitter } from "node:events";
import path from "node:path";
import { after, describe, it } from "node:test";
import { pathToFileURL } from "node:url";
import type { Worker } from "node:worker_threads";
import {
__setCompressionWorkerFactoryForTests,
Expand Down Expand Up @@ -602,7 +604,7 @@ describe("llmlingua worker spawn specifier", () => {
const specifier = llmlinguaWorkerSpecifier("/app/onnxWorker.js");
assert.ok(specifier instanceof URL, "Worker entry must be a URL object, not a string");
assert.equal(specifier.protocol, "file:");
assert.equal(specifier.pathname, "/app/onnxWorker.js");
assert.equal(specifier.pathname, pathToFileURL(path.resolve("/app/onnxWorker.js")).pathname);
});
});

Expand Down
4 changes: 3 additions & 1 deletion tests/unit/compression/rtk-toml-compatibility.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ match_command = "^scope-tool"

assert.equal(installed.installedPath, "rtk/filters.toml");
assert.equal(fs.readFileSync(target, "utf8"), SAMPLE);
assert.equal(fs.statSync(target).mode & 0o777, 0o600);
if (process.platform !== "win32") {
assert.equal(fs.statSync(target).mode & 0o777, 0o600);
}
assert.throws(
() => installGlobalRtkTomlV1(SAMPLE),
(error: unknown) =>
Expand Down