fix(GOV-009): 完成最终复审整改
This commit is contained in:
@@ -34,3 +34,13 @@ test('生成契约发生漂移时以明确错误阻断', () => {
|
||||
/生成契约与 Git 提交版本不一致:contract\.json/,
|
||||
);
|
||||
});
|
||||
|
||||
test('生成文件未纳入 Git 跟踪时阻断', () => {
|
||||
const repositoryRoot = createGitFixture();
|
||||
writeFileSync(path.join(repositoryRoot, 'untracked-contract.json'), '{"version":1}\n');
|
||||
|
||||
assert.throws(
|
||||
() => assertGeneratedContractsUnchanged(repositoryRoot, ['untracked-contract.json']),
|
||||
/生成契约未纳入 Git 跟踪:untracked-contract\.json/,
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user