@@ -11,6 +11,9 @@ describe('data is normalized', () => {
11
11
attributes : {
12
12
text : 'hello' ,
13
13
number : 3 ,
14
+ } ,
15
+ links : {
16
+ self : 'http://www.example.com/post/3'
14
17
}
15
18
} ,
16
19
{
@@ -19,6 +22,9 @@ describe('data is normalized', () => {
19
22
attributes : {
20
23
text : 'hello world' ,
21
24
number : 4 ,
25
+ } ,
26
+ links : {
27
+ self : 'http://www.example.com/post/4'
22
28
}
23
29
}
24
30
]
@@ -31,13 +37,19 @@ describe('data is normalized', () => {
31
37
attributes : {
32
38
text : 'hello' ,
33
39
number : 3
40
+ } ,
41
+ links : {
42
+ self : 'http://www.example.com/post/3'
34
43
}
35
44
} ,
36
45
"4" : {
37
46
id : 4 ,
38
47
attributes : {
39
48
text : 'hello world' ,
40
49
number : 4
50
+ } ,
51
+ links : {
52
+ self : 'http://www.example.com/post/4'
41
53
}
42
54
}
43
55
}
@@ -174,7 +186,7 @@ describe('relationships', () => {
174
186
}
175
187
} ]
176
188
} ;
177
-
189
+
178
190
const output = {
179
191
post : {
180
192
"2620" : {
@@ -211,7 +223,7 @@ describe('relationships', () => {
211
223
}
212
224
} ]
213
225
} ;
214
-
226
+
215
227
const output = {
216
228
post : {
217
229
"2620" : {
@@ -251,7 +263,7 @@ describe('relationships', () => {
251
263
}
252
264
} ]
253
265
} ;
254
-
266
+
255
267
const output = {
256
268
post : {
257
269
"2620" : {
@@ -294,7 +306,7 @@ describe('relationships', () => {
294
306
}
295
307
} ]
296
308
} ;
297
-
309
+
298
310
const output = {
299
311
post : {
300
312
"2620" : {
@@ -349,7 +361,7 @@ describe('relationships', () => {
349
361
}
350
362
} ]
351
363
} ;
352
-
364
+
353
365
const output = {
354
366
post : {
355
367
"2620" : {
@@ -407,7 +419,7 @@ describe('relationships', () => {
407
419
}
408
420
} ]
409
421
} ;
410
-
422
+
411
423
const output = {
412
424
post : {
413
425
"2620" : {
@@ -682,7 +694,7 @@ describe('meta', () => {
682
694
}
683
695
} ;
684
696
685
- expect ( isEqual ( normalize ( json3 , { endpoint : 'posts/me' } ) , output3 ) ) . to . be . true ;
697
+ expect ( isEqual ( normalize ( json3 , { endpoint : 'posts/me' } ) , output3 ) ) . to . be . true ;
686
698
} ) ;
687
699
688
700
it ( 'empty collection' , ( ) => {
@@ -1068,7 +1080,7 @@ describe('lazy loading', () => {
1068
1080
"self" : "http://localhost:3000/api/v1/actor/1c9d234b-66c4-411e-b785-955d57db5536/relationships/movie" ,
1069
1081
"related" : "http://localhost:3000/api/v1/actor/1c9d234b-66c4-411e-b785-955d57db5536/movie"
1070
1082
}
1071
- } ,
1083
+ } ,
1072
1084
} ,
1073
1085
type : "question"
1074
1086
} ]
@@ -1087,7 +1099,7 @@ describe('lazy loading', () => {
1087
1099
movie : {
1088
1100
links : {
1089
1101
"self" : "http://localhost:3000/api/v1/actor/1c9d234b-66c4-411e-b785-955d57db5536/relationships/movie" ,
1090
- "related" : "http://localhost:3000/api/v1/actor/1c9d234b-66c4-411e-b785-955d57db5536/movie"
1102
+ "related" : "http://localhost:3000/api/v1/actor/1c9d234b-66c4-411e-b785-955d57db5536/movie"
1091
1103
}
1092
1104
}
1093
1105
}
@@ -1097,6 +1109,6 @@ describe('lazy loading', () => {
1097
1109
1098
1110
it ( 'basic test' , ( ) => {
1099
1111
const result = normalize ( json ) ;
1100
- expect ( isEqual ( result , output ) ) . to . be . true ;
1112
+ expect ( isEqual ( result , output ) ) . to . be . true ;
1101
1113
} ) ;
1102
1114
} ) ;
0 commit comments