mirror of
https://github.com/stablyai/orca.git
synced 2026-11-16 19:07:41 +00:00
36 lines
907 B
JavaScript
36 lines
907 B
JavaScript
import { describe, expect, it } from 'vitest'
|
|
import { collectTerminalPerfRows } from './terminal-perf-report-annotations.mjs'
|
|
|
|
describe('terminal perf report annotations', () => {
|
|
it('keeps trusted source and scenario fields when descriptions contain matching keys', () => {
|
|
const report = {
|
|
suites: [
|
|
{
|
|
specs: [
|
|
{
|
|
tests: [
|
|
{
|
|
annotations: [
|
|
{
|
|
type: 'opencode-scale',
|
|
description: 'source=spoofed.json scenario=spoofed median=12.3ms'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
|
|
expect(collectTerminalPerfRows(report, 'report.json')).toEqual([
|
|
{
|
|
median: '12.3ms',
|
|
scenario: 'opencode-scale',
|
|
source: 'report.json'
|
|
}
|
|
])
|
|
})
|
|
})
|