fix(scope): update scope
This commit is contained in:
parent
93595a222b
commit
fcef5fcb6c
@ -5,20 +5,20 @@ import { tap, expect } from 'tapbundle';
|
|||||||
import * as smartrequest from '../ts/index';
|
import * as smartrequest from '../ts/index';
|
||||||
|
|
||||||
tap.test('should request a html document over https', async () => {
|
tap.test('should request a html document over https', async () => {
|
||||||
await expect(smartrequest.get('https://encrypted.google.com/'))
|
await expect(smartrequest.getJson('https://encrypted.google.com/'))
|
||||||
.to.eventually.property('body')
|
.to.eventually.property('body')
|
||||||
.be.a('string');
|
.be.a('string');
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should request a JSON document over https', async () => {
|
tap.test('should request a JSON document over https', async () => {
|
||||||
await expect(smartrequest.get('https://jsonplaceholder.typicode.com/posts/1'))
|
await expect(smartrequest.getJson('https://jsonplaceholder.typicode.com/posts/1'))
|
||||||
.to.eventually.property('body')
|
.to.eventually.property('body')
|
||||||
.property('id')
|
.property('id')
|
||||||
.equal(1);
|
.equal(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('should post a JSON document over http', async () => {
|
tap.test('should post a JSON document over http', async () => {
|
||||||
await expect(smartrequest.post('http://md5.jsontest.com/?text=example_text'))
|
await expect(smartrequest.postJson('http://md5.jsontest.com/?text=example_text'))
|
||||||
.to.eventually.property('body')
|
.to.eventually.property('body')
|
||||||
.property('md5')
|
.property('md5')
|
||||||
.equal('fa4c6baa0812e5b5c80ed8885e55a8a6');
|
.equal('fa4c6baa0812e5b5c80ed8885e55a8a6');
|
||||||
|
Loading…
Reference in New Issue
Block a user