mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
test: avoid unsafe optional chaining in GTM provider test
This commit is contained in:
@@ -140,7 +140,12 @@ describe('GtmTelemetryProvider', () => {
|
||||
event: 'execution_error',
|
||||
node_type: 'KSampler'
|
||||
})
|
||||
expect((entry?.error as string).length).toBe(100)
|
||||
const error = entry?.error
|
||||
expect(typeof error).toBe('string')
|
||||
if (typeof error !== 'string') {
|
||||
throw new Error('Expected execution_error payload to include an error')
|
||||
}
|
||||
expect(error).toHaveLength(100)
|
||||
})
|
||||
|
||||
it('pushes select_content for template events', () => {
|
||||
|
||||
Reference in New Issue
Block a user