Skip to content

Commit

Permalink
New version 4.0.2 Read more https://github.com/xdan/jodit/blob/main/C…
Browse files Browse the repository at this point in the history
  • Loading branch information
xdan committed Jan 11, 2024
1 parent 013595c commit 832af9c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 10 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jodit",
"version": "4.0.1",
"version": "4.0.2",
"description": "Jodit is awesome and usefully wysiwyg editor with filebrowser",
"main": "build/jodit.min.js",
"types": "./types/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/modules/file-browser/file-browser.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function getFirstItem(fb, index = 0, file = false) {
)[index];
}

('filebrowser' in window.skipTest ? describe.skip : describe.only)(
('filebrowser' in window.skipTest ? describe.skip : describe)(
'Jodit FileBrowser Tests',
() => {
afterEach(() => {
Expand Down
26 changes: 20 additions & 6 deletions src/plugins/delete/delete.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,29 @@

describe('Delete plugin', () => {
describe('Select all and exec delete command', () => {
it('Should remove all content', () => {
const editor = getJodit();
[
['<p>test</p>', ''],
[
`<p>You must include the syntax highlighting library yourself, on your site:</p>
<pre class="language-html">...</pre>
</pre>
<p>After that, the library must be initialized</p>
<pre class="language-javascript">Prism.highlightAll()</pre>`,
''
]
].forEach(([input, result]) => {
describe('For input ' + input, () => {
it('Should remove all content. Result: ' + result, () => {
const editor = getJodit();

editor.value = '<p>test</p>';
editor.value = input;

editor.execCommand('selectall');
editor.execCommand('delete');
editor.execCommand('selectall');
editor.execCommand('delete');

expect(editor.value).equals('');
expect(editor.value).equals(result);
});
});
});
});
});

0 comments on commit 832af9c

Please sign in to comment.