mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2025-01-16 15:56:14 +01:00
16 lines
475 B
JavaScript
16 lines
475 B
JavaScript
|
import test from 'ava'
|
||
|
import baseRequest from '../../src/baseRequest'
|
||
|
|
||
|
test('baseRequest test query and vsprint', async t => {
|
||
|
const target = {
|
||
|
message: 'HTTP Error: Requested page not reachable',
|
||
|
requestURI: 'https://www.google.com/teapot',
|
||
|
status: '418 I\'m a Teapot',
|
||
|
}
|
||
|
const error = await t.throws(baseRequest('https://%s.com/', {
|
||
|
urlTemplateSpec: ['google'],
|
||
|
query: 'teapot'
|
||
|
}))
|
||
|
t.deepEqual(target, error)
|
||
|
})
|