Commit 3b94b6aa authored by Boris Kocherov's avatar Boris Kocherov

tests: improve test result information

parent 112a9f3b
......@@ -140,10 +140,20 @@
return gadget.getContent();
})
.push(function (json_document) {
assert.deepEqual(schema, schema_orig, "schema not change (side effect absent)");
assert.deepEqual(JSON.parse(json_document[key]), value, "returned value equal");
var returned_value;
assert.ok(json_document.hasOwnProperty(key), "getContent does not content property");
assert.deepEqual(schema, schema_orig, "schema changed (side effect on schema)");
try {
returned_value = JSON.parse(json_document[key]);
} catch (error) {
assert.notOk("value not parsable:'" + returned_value + "'\n" + error);
}
assert.deepEqual(returned_value, value,
"document changed without user interact (side effect on data)");
})
.push(undefined, function (error) {
console.log(assert.test.module.name + ': ' + assert.test.testName);
console.error(error);
assert.notOk(error, "issue in gadget");
})
.push(function () {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment