comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:493bcb69166c
1 describe("_.isSimpleObject()", function() {
2 it("returns true for simple objects", function() {
3 expect(_.isSimpleObject({}))
4 .toBe(true);
5 expect(_.isSimpleObject({"x": "y"}))
6 .toBe(true);
7 });
8
9 it("returns false for not simple objects (not objects + arrays, functions, etc.)", function() {
10 expect(_.isSimpleObject(undefined))
11 .toBe(false);
12 expect(_.isSimpleObject(null))
13 .toBe(false);
14 expect(_.isSimpleObject(1))
15 .toBe(false);
16 expect(_.isSimpleObject("test"))
17 .toBe(false);
18 expect(_.isSimpleObject([]))
19 .toBe(false);
20 expect(_.isSimpleObject([1, 2, 3]))
21 .toBe(false);
22 expect(_.isSimpleObject(["foo", "bar"]))
23 .toBe(false);
24 expect(_.isSimpleObject(function(){"test";}))
25 .toBe(false);
26 expect(_.isSimpleObject(App))
27 .toBe(false);
28 expect(_.isSimpleObject(new App.ContextModule.Config()))
29 .toBe(false);
30 });
31 });