forked from do-community/hello_hapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
25 lines (20 loc) · 664 Bytes
/
test.js
File metadata and controls
25 lines (20 loc) · 664 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const { spec } = require('pactum');
// const baseUrl = 'https://api-op-stage.thomasmov.xyz';
const baseUrl = 'http://localhost:8019';
it('should get a response with status code 200', async () => {
const res1 = await spec()
.get(baseUrl + '/site/signup')
.withJson({
"username": "keladmin2",
"password": "keladmin",
"email": "[email protected]"
})
.inspect()
.expectStatus(200);
// const token = res1.json.data.token;
// await spec()
// .get(baseUrl + '/can-shu/operator/list')
// .withHeaders('Authorization', 'Bearer ' + token)
// // .inspect()
// .expectStatus(200);
});