Skip to content

test: strengthen coverage and fixture stability - #76

Merged
Ryson-32 merged 3 commits into
mainfrom
ryan/dev
Aug 5, 2026
Merged

test: strengthen coverage and fixture stability#76
Ryson-32 merged 3 commits into
mainfrom
ryan/dev

Conversation

@Ryson-32

@Ryson-32 Ryson-32 commented Aug 5, 2026

Copy link
Copy Markdown
Member

Summary

  • add an independent coverage gate
  • reorganize regression suites and raise coverage thresholds
  • make the pinned HTTP retry fixture deterministic

Validation

  • lint
  • type checking and builds
  • coverage suite
  • local app checks

Copilot AI lite review requested due to automatic review settings August 5, 2026 18:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of lines (20,000). Try reducing the number of changed lines and requesting a review from Copilot again.

).props.onClick();
expect(Array.from(result.setters[0].mock.results.at(-1)?.value ?? [])).toEqual([]);

result = renderPanel({ 3: "custom-1", 4: " " });
import { parseVMess } from "@subboost/core/parser/protocols/vmess";
import { parseVLESS } from "@subboost/core/parser/protocols/vless";
import { normalizeSsPlugin, parseSS } from "@subboost/core/parser/protocols/ss";
import { parseNetch } from "@subboost/core/parser/protocols/netch";
import { parseVLESS } from "@subboost/core/parser/protocols/vless";
import { normalizeSsPlugin, parseSS } from "@subboost/core/parser/protocols/ss";
import { parseNetch } from "@subboost/core/parser/protocols/netch";
import { preprocessSubscriptionContent } from "@subboost/core/parser/preprocess";
Comment on lines +16 to +19
import {
SUBBOOST_TEMPLATE_CONFIG_SCHEMA,
validateSubBoostTemplateConfig,
} from "@subboost/core/templates/config-template";
return Buffer.from(value).toString("base64url");
}

function netchLink(value: Record<string, unknown>): string {
return `netch://${b64(JSON.stringify(value))}`;
}

function record(value: unknown): Record<string, unknown> {
@@ -0,0 +1,585 @@
import { describe, expect, it } from "vitest";
import { parseClashYaml } from "../../../packages/core/src/parser/clash-yaml";
@@ -0,0 +1,585 @@
import { describe, expect, it } from "vitest";
import { parseClashYaml } from "../../../packages/core/src/parser/clash-yaml";
import { canonicalizeParsedNode, pickAliasValue } from "../../../packages/core/src/parser/canonical-fields";
Comment on lines +14 to +18
import {
parseLineBasedSubscriptionContent,
parseSubscriptionContentByRegistry,
splitNodeLinkSegments,
} from "../../../packages/core/src/parser/content-parsers";
parseSubscriptionContentByRegistry,
splitNodeLinkSegments,
} from "../../../packages/core/src/parser/content-parsers";
import { preprocessSubscriptionContent } from "../../../packages/core/src/parser/preprocess";

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@Ryson-32
Ryson-32 merged commit 6a3557e into main Aug 5, 2026
6 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 963ae470f5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

await expect(parse("String Port = http, string-port.example.com, 8080")).resolves.toMatchObject({
name: "String Port",
type: "http",
port: "8080",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Assert numeric port normalization

For the controlled string-port fixture, this expectation now requires parsePlatformProxyLine to return port as the string "8080", even though ParsedNode/generated proxy nodes model ports as numbers and the test name says this branch is normalizing string ports. This codifies the unnormalized value, so a fix that actually converts parser output to 8080 would fail the regression suite; assert the numeric port instead.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants