Просмотр исходного кода

Added instanceof assertions to clone unit tests

Jason Walton 11 лет назад
Родитель
Сommit
f5e9e30f6b
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      test/lib/pipeline/Document.js

+ 2 - 0
test/lib/pipeline/Document.js

@@ -50,6 +50,7 @@ module.exports = {
 			"should return same field and value from cloned Document ": function clonedDocumentSingleFieldValue() {
 				var doc = new Object({"prop1": 17}),
 					res = Document.clone(doc);
+				assert(res instanceof Object);
 				assert.deepEqual(doc, res);
 				assert.equal(res.prop1, 17);
 			},
@@ -58,6 +59,7 @@ module.exports = {
 				var doc = new Object({"prop1": 17, "prop2": "a string"}),
 					res = Document.clone(doc);
 				assert.deepEqual(doc, res);
+				assert(res instanceof Object);
 				assert.equal(res.prop1, 17);
 				assert.equal(res.prop2, "a string");
 			}