Skip to content

Commit da57d14

Browse files
committed
test: fix test case.
1 parent 2ad1799 commit da57d14

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

core/src/__tests__/index.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ it('CodeMirror onChange', async () => {
2424
const input = await screen.findByRole<HTMLInputElement>('textbox'); // findByRole('textbox');
2525
fireEvent.change(input, { target: { textContent: '# title' } });
2626
const elm = screen.queryByText('# title');
27-
expect((elm as any).cmView.dom.innerHTML).toEqual('# title');
27+
expect(elm?.innerHTML).toEqual('# title');
2828
});
2929

3030
it('CodeMirror onUpdate', async () => {

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,14 @@
3030
"@kkt/less-modules": "^7.5.4",
3131
"@kkt/ncc": "^1.0.13",
3232
"@types/react-test-renderer": "~18.0.0",
33-
"react": "~18.2.0",
34-
"react-dom": "~18.2.0",
3533
"husky": "^9.0.11",
34+
"jest": "^29.7.0",
3635
"kkt": "^7.5.4",
3736
"lerna": "8.0.0",
3837
"lint-staged": "^15.1.0",
3938
"prettier": "^3.0.2",
39+
"react": "~18.2.0",
40+
"react-dom": "~18.2.0",
4041
"react-test-renderer": "~18.2.0",
4142
"tsbb": "^4.5.1"
4243
}

0 commit comments

Comments
 (0)