Created
November 15, 2020 15:42
-
-
Save javierfernandes/93ed500b306d94eb7521c72eb3cf8a28 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('should add a new object for a single ADDED change', () => { | |
doTest({ | |
objects: { | |
A: { id: 'A', name: 'A' }, | |
B: { id: 'B', name: 'B' }, | |
}, | |
changes: [ | |
{ added: { id: 'NEW', sys: 'marker', data: { children: [] }, project: 'my-project' } } | |
], | |
expectedObjects: (objects, changes) => ({ | |
...objects, // reusing data from "objects" context | |
NEW: changes[0].added // reusing data from "changes" input | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment