-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit 9772af5.
- Loading branch information
marker dao ®
committed
Oct 7, 2024
1 parent
49f021d
commit aed1e54
Showing
8 changed files
with
118 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/devextreme/testing/helpers/quillDependencies/noShowdown.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
window.showdown = module.exports = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...e/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditor.missingModules.tests.part1.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
require('../../helpers/ignoreQuillTimers.js'); | ||
require('./htmlEditorParts/importQuill.tests.js'); | ||
require('./htmlEditorParts/importShowdown.tests.js'); |
37 changes: 37 additions & 0 deletions
37
...me/testing/tests/DevExpress.ui.widgets.htmlEditor/htmlEditorParts/importShowdown.tests.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
SystemJS.config({ | ||
map: { | ||
'showdown': '/packages/devextreme/testing/helpers/quillDependencies/noShowdown.js' | ||
} | ||
}); | ||
|
||
define(function(require) { | ||
const MarkdownConverter = require('ui/html_editor/converters/markdown'); | ||
|
||
QUnit.module('Import 3rd party', function() { | ||
QUnit.test('it throw an error if the markdown -> html converter script isn\'t referenced', function(assert) { | ||
assert.throws( | ||
function() { new MarkdownConverter(); }, | ||
function(e) { | ||
return /(E1041)[\s\S]*(Showdown)/.test(e.message); | ||
}, | ||
'The showdown script isn\'t referenced' | ||
); | ||
}); | ||
|
||
QUnit.test('initialize showdown from window', function(assert) { | ||
const prevWinShowdown = window.showdown; | ||
|
||
window.showdown = { | ||
Converter: function() { | ||
this.initialized = true; | ||
} | ||
}; | ||
|
||
const converter = new MarkdownConverter(); | ||
|
||
assert.ok(converter._markdown2Html.initialized); | ||
|
||
window.showdown = prevWinShowdown; | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.