From aafc58c9e15143dd5239950340579efee5c95979 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Sun, 9 Aug 2015 19:38:49 +0300 Subject: initial tests based on karma + jasmine, run with karma start --- src/client/util_test.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/client/util_test.js (limited to 'src/client/util_test.js') diff --git a/src/client/util_test.js b/src/client/util_test.js new file mode 100644 index 00000000..2477aaa2 --- /dev/null +++ b/src/client/util_test.js @@ -0,0 +1,12 @@ +define(['util'], function(util) { + describe("set from object", function () { + it("set from object", function() { + expect(util.set_from_object({1:1, 2:2})).toEqual({1:1, 2:1}); + expect(util.set_from_object({})).toEqual({}); + }); + it("set from array", function() { + expect(util.set_from_array([1, 2])).toEqual({1:1, 2:1}); + expect(util.set_from_array([])).toEqual({}); + }); + }); +}) -- cgit v1.3.1