Create standalone browser port of LTX Athena with authenticated native API transport

This commit is contained in:
Mikei386
2026-09-29 17:59:23 +02:00
commit 1333b0c36b
202 changed files with 63054 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
import { test } from 'node:test'
import assert from 'node:assert/strict'
import { normalizeResponseError } from './response-error.ts'
test('error presentation accepts native, FastAPI, Deck and web-service errors', () => {
for (const input of [{code:'OOM',message:'CUDA OOM'},{detail:'Offline'},{error:'Sign in'},{error:{message:'Activate Video'}},null,[],{detail:[{msg:'invalid'}]}]) {
const value=normalizeResponseError(input)
assert.equal(typeof value.message,'string');assert.ok(value.message.length)
}
assert.equal(normalizeResponseError({error:{message:'Activate Video'}}).message,'Activate Video')
assert.equal(normalizeResponseError({code:'OOM',message:'CUDA OOM'}).code,'OOM')
})