We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8b507d commit 4c59d54Copy full SHA for 4c59d54
test/TreeNode.js
@@ -200,6 +200,28 @@ describe('<TreeNode />', () => {
200
201
assert.isTrue(actual.checked);
202
});
203
+
204
+ describe('optimisticToggle', () => {
205
+ it('should toggle a partially-checked node to unchecked', () => {
206
+ let actual = {};
207
208
+ const wrapper = shallow(
209
+ <TreeNode
210
+ {...baseProps}
211
+ checked={2}
212
+ optimisticToggle={false}
213
+ value="jupiter"
214
+ onCheck={(node) => {
215
+ actual = node;
216
+ }}
217
+ />,
218
+ );
219
220
+ wrapper.find('input[type="checkbox"]').simulate('change');
221
222
+ assert.isFalse(actual.checked);
223
+ });
224
225
226
227
describe('onExpand', () => {
0 commit comments