mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-08 00:02:20 +03:00
Release v3.8.42 — full CHANGELOG in CHANGELOG.md. CI: 103 checks green incl. CodeQL (all languages), Semgrep, all 8 unit shards, coverage, Node 24 compat, and integration tests. Full unit suite validated locally: 19437 pass / 0 fail. The 3 red checks are advisory and do not gate main (no required status checks): SonarCloud/SonarQube new-code coverage gate, and PR Test Policy (test-masking detector flagging the legitimate dead-Phind provider removal in #5530 — reviewed, correct). Includes cycle-close reconciliation + repair of inherited base-red tests from #5480/#5527/#5427/#5521 that the PR->release fast-path did not exercise.
38 lines
1.8 KiB
TypeScript
38 lines
1.8 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { detectCommandType } from "../../open-sse/services/compression/engines/rtk/commandDetector.ts";
|
|
import { matchRtkFilter } from "../../open-sse/services/compression/engines/rtk/filterLoader.ts";
|
|
|
|
// T07 / R9 — gradle + dotnet RTK catalog filters (the catalog gap behind kubectl, etc.).
|
|
|
|
const GRADLE_OUTPUT =
|
|
"Welcome to Gradle 8.5!\n> Task :app:compileJava UP-TO-DATE\n> Task :app:test\nBUILD SUCCESSFUL in 12s\n";
|
|
const DOTNET_OUTPUT =
|
|
"Microsoft (R) Build Engine version 17.8\n Determining projects to restore...\n Restored /repo/App.csproj\nBuild succeeded.\n 0 Warning(s)\n";
|
|
|
|
test("detectCommandType recognizes gradle and dotnet by command", () => {
|
|
assert.equal(detectCommandType("", "gradle build").type, "gradle");
|
|
assert.equal(detectCommandType("", "./gradlew test").type, "gradle");
|
|
assert.equal(detectCommandType("", "dotnet build").type, "dotnet");
|
|
assert.equal(detectCommandType("", "dotnet test").type, "dotnet");
|
|
});
|
|
|
|
test("detectCommandType recognizes gradle/dotnet by output content alone", () => {
|
|
assert.equal(detectCommandType(GRADLE_OUTPUT).type, "gradle");
|
|
assert.equal(detectCommandType(DOTNET_OUTPUT).type, "dotnet");
|
|
});
|
|
|
|
test("matchRtkFilter selects the gradle / dotnet builtin filter", () => {
|
|
const cases: Array<[string, string, string]> = [
|
|
["gradle", GRADLE_OUTPUT, "gradle build"],
|
|
["gradle", GRADLE_OUTPUT, "./gradlew test"],
|
|
["dotnet", DOTNET_OUTPUT, "dotnet build"],
|
|
["dotnet", DOTNET_OUTPUT, "dotnet test"],
|
|
];
|
|
for (const [id, output, command] of cases) {
|
|
const filter = matchRtkFilter(output, command, { customFiltersEnabled: false });
|
|
assert.equal(filter?.id, id, `${command} should match the ${id} filter`);
|
|
assert.equal(filter?.category, "build");
|
|
}
|
|
});
|