Import AITURK IDE 1.0.0-beta.1 from Hermes 63279301; preserve MIT license
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { formatDesktopLogLine } from './desktop-log-line'
|
||||
|
||||
describe('formatDesktopLogLine', () => {
|
||||
it('prefixes each line with an ISO-8601 timestamp and the hermes tag', () => {
|
||||
const line = formatDesktopLogLine('[boot] Resolving Hermes backend')
|
||||
|
||||
// Shape contract (not a snapshot): every desktop log line starts with
|
||||
// an ISO timestamp so multi-surface logs are chronologically readable.
|
||||
// See #84405.
|
||||
expect(line).toMatch(
|
||||
/^\[\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z\] \[hermes\] \[boot\] Resolving Hermes backend$/
|
||||
)
|
||||
})
|
||||
|
||||
it('keeps the message verbatim after the prefix', () => {
|
||||
const line = formatDesktopLogLine('Hermes backend exited (0)')
|
||||
|
||||
expect(line).toMatch(/^\[\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z\] \[hermes\] Hermes backend exited \(0\)$/)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user