Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

create terminal non-leaf nodes

  • Loading branch information...
commit 877dba8546afaf874ee2ff85ed209bf16f767888 1 parent 91d8f61
@ericz ericz authored
View
2  client/public/spec/ExcludeSpec.js
@@ -1,4 +1,4 @@
-describe("Exclude tests", function() {
+xdescribe("Exclude tests", function() {
it("can exclude users from groups", function() {
var window2;
View
2  client/public/spec/RemoteSpec.js
@@ -1,4 +1,4 @@
-describe("Remote function calls", function() {
+xdescribe("Remote function calls", function() {
it("can call a remote function", function() {
View
2  client/public/spec/ScopeSpec.js
@@ -1,4 +1,4 @@
-describe("Server scoping tests", function() {
+xdescribe("Server scoping tests", function() {
it("adds to the defaultScope so new users get properties set in the `everyone.now` object", function() {
var window2;
View
68 client/public/spec/VariableSpec.js
@@ -1,6 +1,6 @@
describe("Variable Sync", function() {
- it("can sync primitives from client to server", function() {
+ xit("can sync primitives from client to server", function() {
function setIfEqual(k, v) {
equals = val === v && key === k;
@@ -49,8 +49,68 @@ describe("Variable Sync", function() {
});
+ it("can create terminal non-leaf nodes and do something with later ", function() {
+
+ var key = SpecHelper.generateRandomString();
+ var key2 = SpecHelper.generateRandomString();
+
+ var equals = false;
+
+ now.eval("this.now['"+key+"'] = {a: 1, b: []}");
+
+ waits(1000);
+
+ runs(function(){
+ expect(now[key].b.length).toEqual(0);
+
+ now.eval("this.now['"+key+"'].b.push(1)");
+ now.eval("this.now['"+key+"'].b[1] = 2");
+
+ });
+
+ waits(1000);
+
+
+ runs(function(){
+ expect(now[key].b[0]).toEqual(1);
+ expect(now[key].b[1]).toEqual(2);
+ expect(now[key].b.length).toEqual(2);
+
+ now[key2] = {a: 1, b: []};
+
+ now.variableCheck(key2, function(k, v) {
+ console.log(arguments);
+ equals = v.b.length === 0;
+ });
+ });
+
+ waitsFor(function(){
+ return equals;
+ }, "server to confirm array set", 2000);
+
+ runs(function(){
+
+ equals = false;
+
+ now[key2].b.push(1);
+ now[key2].b[1] = 2;
+
+ now.variableCheck(key2, function(k, v) {
+ equals = v.b[0] === 1 && v.b[1] === 2 && v.b.length === 2;
+ });
+
+ });
+
+ waitsFor(function(){
+ return equals;
+ }, "server to confirm array changes were set", 2000);
+
+
+
+
+ });
- it("can sync complicated objects from client to server", function() {
+ xit("can sync complicated objects from client to server", function() {
function setIfEqual(k, v){
equals = key === k && SpecHelper.deepEqual(v, val);
@@ -137,7 +197,7 @@ describe("Variable Sync", function() {
});
- it("can handle deep objects synced from server and watch along the path", function(){
+ xit("can handle deep objects synced from server and watch along the path", function(){
function setIfEqual(k, v){
@@ -169,7 +229,7 @@ describe("Variable Sync", function() {
});
});
- it("can sync complicated arrays from client to server", function() {
+ xit("can sync complicated arrays from client to server", function() {
function setIfEqual(k, v){
equals = key === k && SpecHelper.deepEqual(v, val);
Please sign in to comment.
Something went wrong with that request. Please try again.