diff src/DML/MainVisBundle/Resources/assets/jasmine/lib/underscore.mixins.js @ 0:493bcb69166c

added public content
author Daniel Wolff
date Tue, 09 Feb 2016 20:54:02 +0100
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/DML/MainVisBundle/Resources/assets/jasmine/lib/underscore.mixins.js	Tue Feb 09 20:54:02 2016 +0100
@@ -0,0 +1,31 @@
+describe("_.isSimpleObject()", function() {
+    it("returns true for simple objects", function() {
+        expect(_.isSimpleObject({}))
+            .toBe(true);
+        expect(_.isSimpleObject({"x": "y"}))
+            .toBe(true);
+    });
+    
+    it("returns false for not simple objects (not objects + arrays, functions, etc.)", function() {
+        expect(_.isSimpleObject(undefined))
+            .toBe(false);
+        expect(_.isSimpleObject(null))
+            .toBe(false);
+        expect(_.isSimpleObject(1))
+            .toBe(false);
+        expect(_.isSimpleObject("test"))
+            .toBe(false);
+        expect(_.isSimpleObject([]))
+            .toBe(false);
+        expect(_.isSimpleObject([1, 2, 3]))
+            .toBe(false);
+        expect(_.isSimpleObject(["foo", "bar"]))
+            .toBe(false);
+        expect(_.isSimpleObject(function(){"test";}))
+            .toBe(false);
+        expect(_.isSimpleObject(App))
+            .toBe(false);
+        expect(_.isSimpleObject(new App.ContextModule.Config()))
+            .toBe(false);
+    });
+});