

























@@ -52,6 +52,15 @@ const unitFastCandidateGlobs = [
5252"src/wizard/**/*.test.ts",
5353"test/**/*.test.ts",
5454];
55+export const forcedUnitFastTestFiles = [
56+"src/crestodian/overview.test.ts",
57+"src/flows/channel-setup.test.ts",
58+"src/memory-host-sdk/host/session-files.test.ts",
59+"src/node-host/invoke-system-run-plan.test.ts",
60+"src/node-host/invoke-system-run.test.ts",
61+"src/pairing/pairing-store.test.ts",
62+];
63+const forcedUnitFastTestFileSet = new Set(forcedUnitFastTestFiles);
5564const unitFastCandidateExactFiles = [...pluginSdkLightTestFiles, ...commandsLightTestFiles];
5665const broadUnitFastCandidateGlobs = [
5766"src/**/*.test.ts",
@@ -171,9 +180,9 @@ export function collectUnitFastTestCandidates(cwd = process.cwd()) {
171180matchesAnyGlob(file, unitFastCandidateGlobs) &&
172181!matchesAnyGlob(file, broadUnitFastCandidateSkipGlobs),
173182);
174-return [...new Set([...discovered, ...unitFastCandidateExactFiles])].toSorted((a, b) =>
175-a.localeCompare(b),
176-);
183+return [
184+...new Set([...discovered, ...unitFastCandidateExactFiles, ...forcedUnitFastTestFiles]),
185+].toSorted((a, b) => a.localeCompare(b));
177186}
178187179188export function collectBroadUnitFastTestCandidates(cwd = process.cwd()) {
@@ -185,9 +194,9 @@ export function collectBroadUnitFastTestCandidates(cwd = process.cwd()) {
185194matchesAnyGlob(file, broadUnitFastCandidateGlobs) &&
186195!matchesAnyGlob(file, broadUnitFastCandidateSkipGlobs),
187196);
188-return [...new Set([...discovered, ...unitFastCandidateExactFiles])].toSorted((a, b) =>
189-a.localeCompare(b),
190-);
197+return [
198+...new Set([...discovered, ...unitFastCandidateExactFiles, ...forcedUnitFastTestFiles]),
199+].toSorted((a, b) => a.localeCompare(b));
191200}
192201193202export function collectUnitFastTestFileAnalysis(cwd = process.cwd(), options = {}) {
@@ -208,9 +217,11 @@ export function collectUnitFastTestFileAnalysis(cwd = process.cwd(), options = {
208217};
209218}
210219const reasons = classifyUnitFastTestFileContent(source);
220+const forced = forcedUnitFastTestFileSet.has(file);
211221return {
212222 file,
213-unitFast: reasons.length === 0,
223+unitFast: forced || reasons.length === 0,
224+ forced,
214225 reasons,
215226};
216227});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。