Slight improvements to existing tests

This commit is contained in:
Danielv123 committed 2017-06-07 20:33:20 +02:00
1 parent 913887fd2c
commit 00dd22e59f
2 files changed
+24 -21

No files matched your search

@@ -5,7 +5,7 @@ describe("isJson.js()", function(){
it("checks if a thing is valid JSON", function(){
assert(isJson("string") === false);
assert(isJson("{js_object_notation='very false'}") === false);
assert(isJson('{ "name":"John", "age":31, "city":"New York" }') === true);
assert(isJson('{ "name":"John", "age":31, "city":"New York" }') === true, "This is valid JSON, lib disagrees");
});
it("recognizes that true and false are both valid JSON", function(){
assert(isJson(true) === true);
@@ -15,6 +15,6 @@ describe("isJson.js()", function(){
assert(isJson(null) === true);
});
it("Recognizes that JSON doesn't allow trailing commas (,)", function(){
assert(isJson('["a", "b", ]') === false);
assert(isJson('["a", "b", ]') === false, "JSON should not allow trailing commas");
});
});