Skip to content

Commit 6601430

Browse files
committed
fix prettier
1 parent 1e019ff commit 6601430

File tree

1 file changed

+7
-15
lines changed

1 file changed

+7
-15
lines changed

packages/x-tree-view/src/internals/plugins/useTreeViewKeyboardNavigation/useTreeViewKeyboardNavigation.test.tsx

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ describeTreeView<
139139
expect(view.getFocusedItemId()).to.equal('1.1');
140140
});
141141

142-
it("should move the focus to the last visible and enabled descendant of the previous sibling", () => {
142+
it('should move the focus to the last visible and enabled descendant of the previous sibling', () => {
143143
const view = render({
144144
items: [
145145
{
@@ -148,27 +148,23 @@ describeTreeView<
148148
{ id: '1-1' },
149149
{
150150
id: '1-2',
151-
children: [
152-
{ id: '1-2-1' },
153-
{ id: '1-2-2' },
154-
{ id: '1-2-3' },
155-
],
151+
children: [{ id: '1-2-1' }, { id: '1-2-2' }, { id: '1-2-3' }],
156152
},
157153
],
158154
},
159155
{ id: '2' },
160156
],
161157
defaultExpandedItems: ['1', '1-2'],
162158
});
163-
159+
164160
act(() => {
165161
view.getItemRoot('2').focus();
166162
});
167163
fireEvent.keyDown(view.getItemRoot('2'), { key: 'ArrowUp' });
168164
expect(view.getFocusedItemId()).to.equal('1-2-3');
169165
});
170166

171-
it("should move the focus to the last visible descendant of the previous sibling, skipping disabled items", () => {
167+
it('should move the focus to the last visible descendant of the previous sibling, skipping disabled items', () => {
172168
const view = render({
173169
items: [
174170
{
@@ -177,24 +173,20 @@ describeTreeView<
177173
{ id: '1-1' },
178174
{
179175
id: '1-2',
180-
children: [
181-
{ id: '1-2-1' },
182-
{ id: '1-2-2' },
183-
{ id: '1-2-3', disabled: true},
184-
],
176+
children: [{ id: '1-2-1' }, { id: '1-2-2' }, { id: '1-2-3', disabled: true }],
185177
},
186178
],
187179
},
188180
{ id: '2' },
189181
],
190182
defaultExpandedItems: ['1', '1-2'],
191183
});
192-
184+
193185
act(() => {
194186
view.getItemRoot('2').focus();
195187
});
196188
fireEvent.keyDown(view.getItemRoot('2'), { key: 'ArrowUp' });
197-
expect(view.getFocusedItemId()).to.equal('1-2-2');
189+
expect(view.getFocusedItemId()).to.equal('1-2-2');
198190
});
199191

200192
it('should skip disabled items', () => {

0 commit comments

Comments
 (0)