Add associates() method to state objects
Change-Id: Ie62455b7b73424502ac01e2534482a3db99225ff
diff --git a/dev/js/spec/stateSpec.js b/dev/js/spec/stateSpec.js
index 865691e..6a2f32a 100644
--- a/dev/js/spec/stateSpec.js
+++ b/dev/js/spec/stateSpec.js
@@ -34,14 +34,17 @@
this.x = value;
}
};
-
+
+ expect(s.associates()).toEqual(0);
expect(s.get()).toBeFalsy();
expect(obj1.x).toBeFalsy();
expect(obj2.x).toBeTruthy();
// Associate object with state
s.associate(obj1);
+ expect(s.associates()).toEqual(1);
s.associate(obj2);
+ expect(s.associates()).toEqual(2);
expect(s.get()).toBeFalsy();
expect(obj1.x).toBeFalsy();