Open JohnnyBizzel opened 7 years ago
ACTUAL EXPECTED
────────────────────────────────────────────────────────────────────────────────
"[" != "[{\"title\":\"Express.js Guide\",\"tags\":[\"node.js\",\"express.js\"],\"url\":\"http://expressjsguide.com\"},{\"title\":\"Rapid Prototyping with JS\",\"tags\":[\"backbone.js\",\"node.js\",\"mongodb\"],\"url\":\"http://rpjs.co\"},{\"title\":\"JavaScript: The Good Parts\",\"tags\":[\"javascript\"]}]" " \"title\": \"Express.js Guide\"," != " \"tags\": [" != " \"node.js\"," != " \"express.js\"" != " ]," != " \"url\": \"http://expressjsguide.com\"" != " }," != " {" != " \"title\": \"Rapid Prototyping with JS\"," != " \"tags\": [" != " \"backbone.js\"," != " \"node.js\"," != " \"mongodb\"" != " ]," != " \"url\": \"http://rpjs.co\"" != " }," != " {" != " \"title\": \"JavaScript: The Good Parts\"," != " \"tags\": [" != " \"javascript\"" != " ]" != " }" != "]" !=
For those interested, the work around is to change the res.json(obj) to res.end(JSON.stringify(obj));
the result is a string without the formatting which causes the test case to fail.
────────────────────────────────────────────────────────────────────────────────
"[" != "[{\"title\":\"Express.js Guide\",\"tags\":[\"node.js\",\"express.js\"],\"url\":\"http://expressjsguide.com\"},{\"title\":\"Rapid Prototyping with JS\",\"tags\":[\"backbone.js\",\"node.js\",\"mongodb\"],\"url\":\"http://rpjs.co\"},{\"title\":\"JavaScript: The Good Parts\",\"tags\":[\"javascript\"]}]" " \"title\": \"Express.js Guide\"," !=
" \"tags\": [" !=
" \"node.js\"," !=
" \"express.js\"" !=
" ]," !=
" \"url\": \"http://expressjsguide.com\"" !=
" }," !=
" {" !=
" \"title\": \"Rapid Prototyping with JS\"," !=
" \"tags\": [" !=
" \"backbone.js\"," !=
" \"node.js\"," !=
" \"mongodb\"" !=
" ]," !=
" \"url\": \"http://rpjs.co\"" !=
" }," !=
" {" !=
" \"title\": \"JavaScript: The Good Parts\"," !=
" \"tags\": [" !=
" \"javascript\"" !=
" ]" !=
" }" !=
"]" !=