Skip to content

Commit

Permalink
[fix] add backward compat with internal api change on return value fr…
Browse files Browse the repository at this point in the history
…om setInterval (lolwut)
  • Loading branch information
jcrugzz committed Aug 22, 2013
1 parent 6e95ff4 commit 9f236c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/producer/producer-test.js
Expand Up @@ -44,19 +44,19 @@ vows.describe('godot/producer').addBatch({
topic: function () {
this.now = new Date();
this.values = helpers.fixtures['producer-test'];

return godot.producer(this.values);
},
"should set all values": function (producer) {
var values = this.values;

Object.keys(values).forEach(function (key) {
assert.equal(producer.values[key], values[key]);
});
},
"should set the ttlId": function (producer) {
assert.isObject(producer.ttlId);
assert.isFunction(producer.ttlId.ontimeout);
assert.isFunction(producer.ttlId.ontimeout || producer.ttlId._onTimeout);
},
"setting invalid data-types": macros.shouldThrowOnInvalidValues(),
"setting valid data-types": macros.shouldSetValues(),
Expand All @@ -71,10 +71,10 @@ vows.describe('godot/producer').addBatch({
assert.isTrue((new Date(data.time) - this.now) >= values.ttl);
Object.keys(values).forEach(function (key) {
assert.equal(data[key], values[key]);
});
});
}
}
}
}
}
}).export(module);
}).export(module);

0 comments on commit 9f236c8

Please sign in to comment.