Fixed tests
This commit is contained in:
@ -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,8 +157,8 @@
|
|||||||
""
|
""
|
||||||
],
|
],
|
||||||
"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",
|
||||||
" $(document).ready(function() {",
|
" $(document).ready(function() {",
|
||||||
|
Reference in New Issue
Block a user