优化
This commit is contained in:
@@ -26,8 +26,8 @@ test('does not accept malformed or data-less successful responses', () => {
|
||||
assert.equal(isApiEnvelope({ code: '200', message: 'OK', data: [] }), true)
|
||||
})
|
||||
|
||||
test('overseas transport handles business-code and HTTP security failures', async () => {
|
||||
const transport = await readFile(new URL('./overseasHttp.ts', import.meta.url), 'utf8')
|
||||
assert.match(transport, /if \(isApiFailure\(response.data\)\)/)
|
||||
test('unified transport handles business-code and HTTP security failures', async () => {
|
||||
const transport = await readFile(new URL('./http.ts', import.meta.url), 'utf8')
|
||||
assert.match(transport, /if \(isApiFailure\(invalid\)\)/)
|
||||
assert.match(transport, /isApiEnvelope\(body\) \|\| isApiFailure\(body\)/)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user