yeg
2026-09-09 528d52f2c7c6f911c54cae6e3f25500eab4384fe
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
26
27
28
29
30
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, /record\.sourceType !== 'SNAPSHOT'/)
assert.doesNotMatch(chart, /全部循环/)
assert.match(chart, /saveTestConsoleDetail/)
assert.match(chart, /保存详情/)
assert.doesNotMatch(chart, /另存特殊字段模板/)
assert.match(chart, /Number\(selectedCycle\.value\)/)
assert.match(chart, /stepCurveChartOption/)
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 工步图表实时数据契约通过')