Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyiz4262 authored Oct 22, 2018
1 parent ee9454a commit 51b7885
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/base/tojs.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,4 +403,9 @@ describe("recurseEverything set to true", function() {
const convertedObj = mobx.toJS({ key: cycledObj }, { recurseEverything: true })
expect(convertedObj.key).toBe(convertedObj.key.cycle)
})

test("should return null if source is null", function() {
expect(mobx.toJS(null)).toBeNull()
expect(mobx.toJS(null, { recurseEverything: true })).toBeNull()
})
})

0 comments on commit 51b7885

Please sign in to comment.