forked from rohmanahmad/node_unit_test
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspecs.json
More file actions
110 lines (110 loc) · 2.37 KB
/
specs.json
File metadata and controls
110 lines (110 loc) · 2.37 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
{
"name": "json specs",
"description": "use for testing endpoint",
"server_domain": "http://127.0.0.1:3330",
"auth": {
"type": "jwt",
"access_token": "access_token jika token otomatisnya gk bisa"
},
"list_test": ["login", "mention"],
"test_data": {
"login": {
"describe": "Login /auth/login",
"timeout": 5000,
"test": [
{
"it": "should return response-code:200",
"request": {
"type": "POST",
"endpoint": "/api/v1/auth/login",
"query": {},
"data": {
"username": "narko",
"password": "punt3n"
},
"expects": [
"(res).to.have.status(200)",
"(res.body).to.have.own.property('statusCode')"
],
"prints": [
"res.body.data.token"
]
}
}
]
},
"mention": {
"describe": "Mention /Mention",
"timeout": 5000,
"headers": {
"Accept": "application/json",
"Authorization": "Bearer <access_token>"
},
"test": [
{
"it": "should return response-code:200",
"request": {
"type": "GET",
"endpoint": "/api/v1/mentions",
"query": [
{
"project": 80,
"since": "2017-02-01",
"until": "2017-02-28",
"type": "daily",
"section": "mention",
"service_category": 2,
"author": "",
"domain": "",
"is_total": false,
"filterbot": false
},
{
"project": 80,
"since": "2017-02-01",
"until": "2017-02-28",
"type": "daily",
"section": "mention",
"service_category": 2,
"author": "",
"domain": "",
"is_total": false,
"filterbot": true
},
{
"project": 80,
"since": "2017-02-01",
"until": "2017-02-28",
"type": "daily",
"section": "mention",
"service_category": 2,
"author": "",
"domain": "",
"is_total": true,
"filterbot": false
}
],
"data": {},
"expects": [
[
"(res).to.have.status(200)",
"(res.body).to.have.own.property('statusCode')"
],
[
"(res).to.have.status(200)",
"(res.body).to.have.own.property('statusCode')"
],
[
"(res).to.have.status(200)",
"(res.body).to.have.own.property('statusCode')"
]
],
"prints": [
"res.body.data"
]
}
}
]
}
}
}