You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit c1f6b33
Browse filesBrowse the repository at this point in the historyBrowse files
"Expected to deserialize JSON data from the response."
24
24
);
25
-
expect( data ).toBe( {
26
-
"name":"Luke Skywalker",
27
-
"height":"172",
28
-
"mass":"77",
29
-
"hair_color":"blond",
30
-
"skin_color":"fair",
31
-
"eye_color":"blue",
32
-
"birth_year":"19BBY",
33
-
"gender":"male",
34
-
"homeworld":"https://swapi.co/api/planets/1/",
35
-
"films": [
36
-
"https://swapi.co/api/films/2/",
37
-
"https://swapi.co/api/films/6/",
38
-
"https://swapi.co/api/films/3/",
39
-
"https://swapi.co/api/films/1/",
40
-
"https://swapi.co/api/films/7/"
41
-
],
42
-
"species": [
43
-
"https://swapi.co/api/species/1/"
44
-
],
45
-
"vehicles": [
46
-
"https://swapi.co/api/vehicles/14/",
47
-
"https://swapi.co/api/vehicles/30/"
48
-
],
49
-
"starships": [
50
-
"https://swapi.co/api/starships/12/",
51
-
"https://swapi.co/api/starships/22/"
52
-
],
53
-
"created":"2014-12-09T13:50:51.644000Z",
54
-
"edited":"2014-12-20T21:17:56.891000Z",
55
-
"url":"https://swapi.co/api/people/1/"
56
-
} );
25
+
expect( data ).toBe( deserializeJSON( '{
26
+
"userId": 1,
27
+
"id": 1,
28
+
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
29
+
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
"Expected to deserialize JSON data from the response."
24
24
);
25
-
expect( data ).toBe( {
26
-
"name":"Luke Skywalker",
27
-
"height":"172",
28
-
"mass":"77",
29
-
"hair_color":"blond",
30
-
"skin_color":"fair",
31
-
"eye_color":"blue",
32
-
"birth_year":"19BBY",
33
-
"gender":"male",
34
-
"homeworld":"https://swapi.co/api/planets/1/",
35
-
"films": [
36
-
"https://swapi.co/api/films/2/",
37
-
"https://swapi.co/api/films/6/",
38
-
"https://swapi.co/api/films/3/",
39
-
"https://swapi.co/api/films/1/",
40
-
"https://swapi.co/api/films/7/"
41
-
],
42
-
"species": [
43
-
"https://swapi.co/api/species/1/"
44
-
],
45
-
"vehicles": [
46
-
"https://swapi.co/api/vehicles/14/",
47
-
"https://swapi.co/api/vehicles/30/"
48
-
],
49
-
"starships": [
50
-
"https://swapi.co/api/starships/12/",
51
-
"https://swapi.co/api/starships/22/"
52
-
],
53
-
"created":"2014-12-09T13:50:51.644000Z",
54
-
"edited":"2014-12-20T21:17:56.891000Z",
55
-
"url":"https://swapi.co/api/people/1/"
56
-
} );
25
+
expect( data ).toBe( deserializeJSON( '{
26
+
"userId": 1,
27
+
"id": 1,
28
+
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
29
+
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
30
+
}' ) );
31
+
} );
32
+
33
+
it( "has access to the original HyperRequest in the HyperResponse", function() {
0 commit comments