Skip to content

Commit 65ba9b6

Browse files
KangXinzhicrazylxrmiracles1919
authored
style: fix text overflow (alibaba#1907)
* style: fix text overflow * chore: update pnpm-lock * chore: upgrade typescript * chore: update package.json * chore: update package.json * chore: update package.json * chore: update pnpm-lock * test(useUrlState): remove `useNavigate` mock * revert: pnpm version * chore: update `pnpm-lock` Co-authored-by: 潇见 <[email protected]> Co-authored-by: lujie <[email protected]>
1 parent 223852b commit 65ba9b6

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

packages/hooks/src/useTextSelection/demo/demo3.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default () => {
1717
<div ref={ref} style={{ border: '1px solid', padding: 20 }}>
1818
<p>Please swipe your mouse to select any text on this paragraph.</p>
1919
</div>
20-
<p>Result:{JSON.stringify(selection)}</p>
20+
<p style={{ wordWrap: 'break-word' }}>Result:{JSON.stringify(selection)}</p>
2121
</div>
2222
);
2323
};
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
import { act } from '@testing-library/react-hooks/dom';
22
import { setup } from '.';
33

4-
const navigate = jest.fn();
5-
jest.mock('react-router', () => {
6-
return {
7-
...jest.requireActual('react-router'),
8-
useNavigate: () => navigate,
9-
};
10-
});
11-
124
describe('React Router V6', () => {
135
it('useUrlState should be work', () => {
146
const res = setup(['/index']);
@@ -17,6 +9,5 @@ describe('React Router V6', () => {
179
});
1810

1911
expect(res.state).toMatchObject({ count: '1' });
20-
expect(navigate).toBeCalledWith({ hash: '', search: 'count=1' }, { replace: false });
2112
});
2213
});

pnpm-lock.yaml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)