From 6ad51aa66ea8f5a32f1b33ddf0bb8ddb0392261c Mon Sep 17 00:00:00 2001 From: Louis TOUSSAINT Date: Thu, 8 Aug 2024 02:54:35 +0200 Subject: [PATCH] Tests(DPxAI): WIP Upload test for quest01 objects-around --- js/tests/objects-around.json | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 js/tests/objects-around.json diff --git a/js/tests/objects-around.json b/js/tests/objects-around.json new file mode 100644 index 000000000..14406290f --- /dev/null +++ b/js/tests/objects-around.json @@ -0,0 +1,26 @@ +[ + { + "description": "variable robot is declared and of type object", + "code": "equal(typeof robot, 'object')" + }, + { + "description": "property name from robot is of type string", + "code": "equal(typeof robot.name, 'string')" + }, + { + "description": "property age from robot is of type number", + "code": "equal(typeof robot.age, 'number')" + }, + { + "description": "property hasEnergy from robot is of type boolean", + "code": "equal(typeof robot.hasEnergy, 'boolean')" + }, + { + "description": "all 3 variable should be defined and have the right values", + "code": "let robot = {\n name: 'Freddy',\n age: 27,\n hasEnergy: false,\n}\n\n// Your code\n\nequal({ name, age, hasEnergy }, robot)" + }, + { + "description": "value should also work for Jean-Pierre", + "code": "let robot = {\n name: 'Jean-Pierre',\n age: 65,\n hasEnergy: true,\n}\n\n// Your code\n\nequal({ name, age, hasEnergy }, robot)" + } +] \ No newline at end of file