Repository URL to install this package:
|
Version:
1.1.16 ▾
|
import { Request } from './index'
describe.skip('APIWRAP', () => {
const todo = () => console.log('TODO')
const SIMPLE_BODY = {
name: 'MikeMyers',
}
const COMPLEX_BODY = [
{
name: 'Mike',
},
{
nested: [
{
todo: true,
},
],
},
]
test('that it works', () => {
const request = new Request()
request
.setDebug(true)
.setMethod('POST')
.setDefaultParams({ eh: true })
.setUrl('https://skava.com')
.setBody(SIMPLE_BODY)
.setData()
// .setBody(COMPLEX_BODY)
expect(0).toBeFalsy()
})
test('defaults', todo)
describe('MIDDLEWARE', () => {
test('lifecycle events are all called', todo)
test('Request.middleware', todo)
test('PersistMiddleware', todo)
test('StaticFixtures', todo)
test('Autofix', todo)
})
describe('Request.method - GET', () => {
test('Request.method - GET', () => {
// .params
// .params + .query?
})
test('Request.method - POST', todo)
test('Request.method - FORMDATA', todo)
test('using nock?', todo)
test('using supertest?', todo)
})
describe('ADAPTER', () => {
test('can use axios', todo)
test('can use frisbee', todo)
test('can use apollo-fetch', todo)
test('can use aj(ax) [smallest ajax lib, used in fuse-box]', todo)
})
describe('DEPS', () => {
test('can hash properly', todo)
test('detects error correctly .repeat(accurate, keys, status, responseCode)', todo)
})
})