mirror of
https://github.com/motajs/template.git
synced 2026-09-16 12:18:50 +08:00
- classify only all-compatibility cycles outside the approved gate - preserve fail-closed data and common boundary reporting
16 lines
591 B
TypeScript
16 lines
591 B
TypeScript
import { describe, expect, it } from 'vitest';
|
|
import { classifyCycle, isInScope } from './check-data-circular';
|
|
|
|
describe('circular gate scope classifier', () => {
|
|
// 仅兼容路径组成的 legacy cycle 应被排除在门禁范围之外
|
|
it('classifies a legacy-only cycle as outside scope', () => {
|
|
const cycle = [
|
|
'packages-user\\data-state\\src\\legacy\\move.ts',
|
|
'packages-user/data-state/src/legacy/map.ts'
|
|
];
|
|
|
|
expect(classifyCycle(cycle).compatibilityOnly).toBe(true);
|
|
expect(isInScope(cycle)).toBe(false);
|
|
});
|
|
});
|