fix: require runtime evidence in budget gate
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { writeFile } from 'node:fs/promises';
|
||||
import { resolve } from 'node:path';
|
||||
import { expect, test } from '../helpers/serve-dist';
|
||||
import { authorizedPerformanceUrl } from '../helpers/test-build-auth';
|
||||
import {
|
||||
@@ -48,9 +49,13 @@ test('runtime-budget-trace.v1 captures the actual High production allocation at
|
||||
};
|
||||
const evaluated = validateRuntimeBudgetTraceReport(report);
|
||||
expect(evaluated.violations).toEqual([]);
|
||||
await writeFile(testInfo.outputPath('runtime-budget-trace.v1.json'), `${JSON.stringify({
|
||||
const serialized = `${JSON.stringify({
|
||||
...report,
|
||||
runtimeBudgetSummary: evaluated.tier,
|
||||
violations: evaluated.violations,
|
||||
}, null, 2)}\n`);
|
||||
}, null, 2)}\n`;
|
||||
await Promise.all([
|
||||
writeFile(testInfo.outputPath('runtime-budget-trace.v1.json'), serialized),
|
||||
writeFile(resolve('test-results/runtime-budget-trace.v1.json'), serialized),
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user