Skip to content

Commit 19d25b0

Browse files
committed
feat: make Jodit instance creation asynchronous to ensure readiness
1 parent 02f3ad6 commit 19d25b0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/tests/acceptance/esm.test.esm.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ import { Jodit } from '../../../build/esm/index.js';
55
import { expect } from 'chai';
66

77
describe('ESM build', () => {
8-
it('Should create Jodit instance', () => {
8+
it('Should create Jodit instance', async () => {
99
const textarea = document.createElement('textarea');
1010
document.body.appendChild(textarea);
1111
textarea.value = '<p>test</p>';
1212

1313
const editor = Jodit.make(textarea);
1414
expect(editor instanceof Jodit).is.true;
15+
await editor.waitForReady();
1516

1617
expect(editor.value).eq(textarea.value);
1718
expect(Jodit.plugins.size).above(60);

0 commit comments

Comments
 (0)