Fixed tests

This commit is contained in:
benmcmahon100
2015-10-06 21:47:29 +01:00
parent da09a7b650
commit 9f298cbe94

View File

@ -10,19 +10,18 @@
"", "",
"JSON is a way of creating a file or a db record from a javascript object.", "JSON is a way of creating a file or a db record from a javascript object.",
"JSON works in the exact same way as javascript objects that you should be familiar with.", "JSON works in the exact same way as javascript objects that you should be familiar with.",
"" "Lets add a string property to out object."
], ],
"tests": [ "tests": [
"assert(typeof json !== 'undefined')" "assert(typeof json !== 'undefined' && Object.keys(json).length === 3 && typeof(json[Object.keys(json)[Object.keys(json).length-1]]) === 'string', 'message: You should have added a string value to your object.')"
], ],
"challengeSeed": [ "challengeSeed": [
"var json = {", "var json = {",
" name: \"Happy Camper\"", " \"name\": \"Happy Camper\"",
" age: 35", " \"height\": \"160cm\"",
" height: \"5ft 8\"",
"}" "}"
], ],
"challengeType": 0, "challengeType": 1,
"type": "waypoint" "type": "waypoint"
}, },
{ {
@ -158,7 +157,7 @@
"" ""
], ],
"tests": [ "tests": [
"assert($(\".message\").html() !== '', 'The message box should have something in it')" "assert(/json\\.map/gi, 'The message box should have something in it')"
], ],
"challengeSeed": [ "challengeSeed": [
"fccss", "fccss",