Skip to content

Commit

Permalink
Computed triggering the creation of an observable map invariant failed
Browse files Browse the repository at this point in the history
…#798

Added a map.set into the test case.  The tests are now broken.
  • Loading branch information
mattruby committed Jan 27, 2017
1 parent 5c91694 commit 46c88d8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions test/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,20 @@ test('798, cannot return observable map from computed prop', t => {

form = function (settings) {
var form = mobx.observable({
reactPropsMap: mobx.observable.map(),
reactPropsMap: mobx.observable.map({
onSubmit: function () {
console.log('onSubmit init!');
}
}),
model: {
value: 'TEST'
}
});

form.reactPropsMap.set('onSubmit', function () {
console.log('onSubmit overwritten!');
});

return form;
};

Expand All @@ -546,4 +555,4 @@ test('798, cannot return observable map from computed prop', t => {
})

t.end()
})
})

0 comments on commit 46c88d8

Please sign in to comment.