@@ -70,7 +70,7 @@ module('Unit | mungOptionsForFetch', function () {
70
70
} ;
71
71
72
72
const options = mungOptionsForFetch ( getOptions ) ;
73
- assert . equal ( options . method , 'GET' ) ;
73
+ assert . strictEqual ( options . method , 'GET' ) ;
74
74
} ) ;
75
75
76
76
test ( 'mungOptionsForFetch sets the method to an uppercase string' , function ( assert ) {
@@ -81,15 +81,15 @@ module('Unit | mungOptionsForFetch', function () {
81
81
} ;
82
82
83
83
let options = mungOptionsForFetch ( getOptions ) ;
84
- assert . equal ( options . method , 'GET' ) ;
84
+ assert . strictEqual ( options . method , 'GET' ) ;
85
85
86
86
const postOptions = {
87
87
url : 'https://emberjs.com' ,
88
88
method : 'post' ,
89
89
} ;
90
90
91
91
options = mungOptionsForFetch ( postOptions ) ;
92
- assert . equal ( options . method , 'POST' ) ;
92
+ assert . strictEqual ( options . method , 'POST' ) ;
93
93
} ) ;
94
94
95
95
test ( 'mungOptionsForFetch adds string query params to the url correctly' , function ( assert ) {
@@ -102,7 +102,7 @@ module('Unit | mungOptionsForFetch', function () {
102
102
} ;
103
103
104
104
let options = mungOptionsForFetch ( noQueryStringOptions ) ;
105
- assert . equal (
105
+ assert . strictEqual (
106
106
options . url ,
107
107
`${ baseUrl } ?a=1&b=2` ,
108
108
'url that started without query params has query params'
@@ -114,7 +114,7 @@ module('Unit | mungOptionsForFetch', function () {
114
114
} ;
115
115
116
116
options = mungOptionsForFetch ( hasQueryStringOptions ) ;
117
- assert . equal (
117
+ assert . strictEqual (
118
118
options . url ,
119
119
`${ baseUrl } ?fastboot=true&a=1&b=2` ,
120
120
'url that started with query params has more query params'
@@ -154,7 +154,7 @@ module('Unit | mungOptionsForFetch', function () {
154
154
155
155
// Tests POST method.
156
156
let options = mungOptionsForFetch ( baseOptions ) ;
157
- assert . equal (
157
+ assert . strictEqual (
158
158
options . body ,
159
159
JSON . stringify ( baseOptions . data ) ,
160
160
'POST request body correctly set'
@@ -163,7 +163,7 @@ module('Unit | mungOptionsForFetch', function () {
163
163
// Tests PUT method.
164
164
baseOptions . type = 'PUT' ;
165
165
options = mungOptionsForFetch ( baseOptions ) ;
166
- assert . equal (
166
+ assert . strictEqual (
167
167
options . body ,
168
168
JSON . stringify ( baseOptions . data ) ,
169
169
'PUT request body correctly set'
@@ -172,7 +172,7 @@ module('Unit | mungOptionsForFetch', function () {
172
172
// Tests DELETE method.
173
173
baseOptions . type = 'DELETE' ;
174
174
options = mungOptionsForFetch ( baseOptions ) ;
175
- assert . equal (
175
+ assert . strictEqual (
176
176
options . body ,
177
177
JSON . stringify ( baseOptions . data ) ,
178
178
'DELETE request has the correct body'
@@ -204,31 +204,31 @@ module('Unit | mungOptionsForFetch', function () {
204
204
} ;
205
205
206
206
let options = mungOptionsForFetch ( baseOptions ) ;
207
- assert . equal (
207
+ assert . strictEqual (
208
208
options . body ,
209
209
undefined ,
210
210
'GET request does not have a request body'
211
211
) ;
212
212
213
213
baseOptions . type = 'HEAD' ;
214
214
options = mungOptionsForFetch ( baseOptions ) ;
215
- assert . equal (
215
+ assert . strictEqual (
216
216
options . body ,
217
217
undefined ,
218
218
'HEAD request does not have a request body'
219
219
) ;
220
220
221
221
baseOptions . data = { } ;
222
222
options = mungOptionsForFetch ( baseOptions ) ;
223
- assert . equal (
223
+ assert . strictEqual (
224
224
options . body ,
225
225
undefined ,
226
226
'HEAD request does not have a request body when `data` is an empty object'
227
227
) ;
228
228
229
229
baseOptions . type = 'GET' ;
230
230
options = mungOptionsForFetch ( baseOptions ) ;
231
- assert . equal (
231
+ assert . strictEqual (
232
232
options . body ,
233
233
undefined ,
234
234
'GET request does not have a request body when `data` is an empty object'
@@ -245,7 +245,7 @@ module('Unit | mungOptionsForFetch', function () {
245
245
} ;
246
246
247
247
const getOptions = mungOptionsForFetch ( getData ) ;
248
- assert . equal (
248
+ assert . strictEqual (
249
249
getOptions . url . indexOf ( '?' ) ,
250
250
- 1 ,
251
251
'A question mark is not added if there are no query params to add'
@@ -258,7 +258,11 @@ module('Unit | mungOptionsForFetch', function () {
258
258
} ;
259
259
260
260
const postOptions = mungOptionsForFetch ( postData ) ;
261
- assert . equal ( postOptions . body , '{}' , "'options.body' is an empty object" ) ;
261
+ assert . strictEqual (
262
+ postOptions . body ,
263
+ '{}' ,
264
+ "'options.body' is an empty object"
265
+ ) ;
262
266
} ) ;
263
267
264
268
test ( "mungOptionsForFetch sets the request body correctly when 'data' is FormData" , function ( assert ) {
@@ -272,7 +276,7 @@ module('Unit | mungOptionsForFetch', function () {
272
276
} ;
273
277
274
278
const postOptions = mungOptionsForFetch ( postData ) ;
275
- assert . equal (
279
+ assert . strictEqual (
276
280
postOptions . body ,
277
281
formData ,
278
282
"'options.body' is the FormData passed in"
@@ -291,7 +295,7 @@ module('Unit | mungOptionsForFetch', function () {
291
295
} ;
292
296
293
297
const postOptions = mungOptionsForFetch ( postData ) ;
294
- assert . equal (
298
+ assert . strictEqual (
295
299
postOptions . body ,
296
300
JSON . stringify ( data ) ,
297
301
"'options.body' is properly converted to a string"
0 commit comments