Skip to content

Commit

Permalink
fix: add tests for 'set' with object syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrsh committed Aug 30, 2017
1 parent 191b81d commit 4638a89
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions test/core/instance/data.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,26 @@ describe('Data', function() {
});

it('when setting new property', function() {
var newMsg = dataApp3.get("msg");
newMsg.obj.nested = "Nested Value";
dataApp3.set("msg", newMsg);
dataApp3.set({
msg: {
obj: {
nested: "Nested Value"
}
}
});
return wait(function() {
expect(data3.innerHTML).to.equal("Nested Value");
});
});

it('when updating new data property', function() {
var newMsg = dataApp3.get("msg");
newMsg.obj.nested = "New Nested";
dataApp3.set("msg", newMsg);
dataApp3.set({
msg: {
obj: {
nested: "New Nested"
}
}
});
return wait(function() {
expect(data3.innerHTML).to.equal("New Nested");
});
Expand Down

0 comments on commit 4638a89

Please sign in to comment.