From fdcc1af4e22c65d4b920b6143918d54c66ab0d08 Mon Sep 17 00:00:00 2001 From: Marek Kotewicz Date: Tue, 3 Feb 2015 19:48:51 +0100 Subject: clearing tests --- test/test.utils.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/test.utils.js (limited to 'test/test.utils.js') diff --git a/test/test.utils.js b/test/test.utils.js new file mode 100644 index 000000000..8a1e9a0b6 --- /dev/null +++ b/test/test.utils.js @@ -0,0 +1,19 @@ +var assert = require('assert'); + +var methodExists = function (object, method) { + it('should have method ' + method + ' implemented', function() { + assert.equal('function', typeof object[method], 'method ' + method + ' is not implemented'); + }); +}; + +var propertyExists = function (object, property) { + it('should have property ' + property + ' implemented', function() { + assert.notEqual('undefined', typeof object[property], 'property ' + property + ' is not implemented'); + }); +}; + +module.exports = { + methodExists: methodExists, + propertyExists: propertyExists +}; + -- cgit v1.2.3