fix(ui): показывать реальный источник и ошибки DNS
This commit is contained in:
1 parent
155dfc5716
commit
1b91ba4e1d
6 files changed
+30
-5
No files matched your search
@@ -6,3 +6,5 @@ test("Диагностика отклоняет legacy error и oversized output
|
||||
|
||||
import { probeServersSchema } from "./probe-response"
|
||||
test("Каталог диагностики требует уникальные id и достоверный status/enabled",()=>{const row={id:1,name:"Тест",host:"192.0.2.1",type:"exit-node",enabled:true,status:null};assert.equal(probeServersSchema.safeParse([row]).success,true);for(const rows of [[row,row],[{...row,id:0}],[{...row,status:"active"}],[{...row,enabled:"yes"}]])assert.equal(probeServersSchema.safeParse(rows).success,false)})
|
||||
|
||||
test("DNS inline ERROR не подтверждает успех",()=>{assert.throws(()=>readProbeOutput({output:";; QUESTION: example.test A\n;; ERROR: ENOTFOUND"}),/ENOTFOUND/);assert.equal(readProbeOutput({output:";; QUESTION: example.test A\nexample.test IN A 192.0.2.1"}),";; QUESTION: example.test A\nexample.test IN A 192.0.2.1")})
|
||||
Reference in new issue
Block a user