mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-02-22 23:23:54 +08:00
fix(spellchecker) Fix spellchecker specs
This commit is contained in:
parent
710dc1a4c4
commit
91f74f7482
1 changed files with 3 additions and 3 deletions
|
@ -17,7 +17,7 @@ describe('SpellcheckComposerExtension', function spellcheckComposerExtension() {
|
|||
spyOn(Spellchecker, 'isMisspelled').andCallFake(word => spellings[word])
|
||||
});
|
||||
|
||||
describe("update", () => {
|
||||
describe("onContentChanged", () => {
|
||||
it("correctly walks a DOM tree and surrounds mispelled words", () => {
|
||||
const node = document.createElement('div');
|
||||
node.innerHTML = initialHTML;
|
||||
|
@ -27,7 +27,7 @@ describe('SpellcheckComposerExtension', function spellcheckComposerExtension() {
|
|||
whilePreservingSelection: (cb) => cb(),
|
||||
};
|
||||
|
||||
SpellcheckComposerExtension.update(editor);
|
||||
SpellcheckComposerExtension.onContentChanged({editor});
|
||||
expect(node.innerHTML).toEqual(afterHTML);
|
||||
});
|
||||
|
||||
|
@ -50,7 +50,7 @@ describe('SpellcheckComposerExtension', function spellcheckComposerExtension() {
|
|||
whilePreservingSelection: (cb) => cb(),
|
||||
};
|
||||
|
||||
SpellcheckComposerExtension.update(editor);
|
||||
SpellcheckComposerExtension.onContentChanged({editor});
|
||||
expect(node.innerHTML).toEqual(`
|
||||
<br>
|
||||
This is a <spelling class="misspelled">testst</spelling>! I have a few <spelling class="misspelled">misspellled</spelling> words.
|
||||
|
|
Loading…
Reference in a new issue