yeg
2026-09-02 1858334fbc347e284a55b29693a0695ec19694bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import assert from 'node:assert/strict'
import { readFile } from 'node:fs/promises'
 
const chart = await readFile(new URL('../src/components/ConsoleChartPanel.vue', import.meta.url), 'utf8')
const consoleView = await readFile(new URL('../src/views/TestConsole.vue', import.meta.url), 'utf8')
const dataList = await readFile(new URL('../src/components/ConsoleDataListPanel.vue', import.meta.url), 'utf8')
 
assert.match(chart, /PersistedTestRecord/)
assert.match(chart, /metricCode/)
assert.match(chart, /POSITIVE_POTENTIAL/)
assert.match(chart, /NEGATIVE_POTENTIAL/)
assert.match(chart, /selectedRecords\(\)/)
assert.match(chart, /全部循环/)
assert.match(chart, /smooth: false/)
assert.match(chart, /暂无当前测试实时数据/)
assert.doesNotMatch(chart, /const stepOptions = \['5-21 恒流充电'/)
assert.doesNotMatch(chart, /function seriesValues\(/)
assert.match(consoleView, /getPersistedTestRecords/)
assert.match(consoleView, /:records="realtimeRecords"/)
assert.match(dataList, /<th>温度\(℃\)<\/th>/)
assert.match(dataList, /<th>正电位\(V\)<\/th>/)
assert.match(dataList, /<th>负电位\(V\)<\/th>/)
assert.match(dataList, /temperature: (?:extension\('TEMPERATURE'\)|snapshot \?)/)
 
console.log('Ticket02/03 工步图表实时数据契约通过')