test:修改测试内容中的部分描述和名称
This commit is contained in:
parent
2675c8e401
commit
a9a3aa22b0
|
@ -12,13 +12,13 @@ import { getMenuInstance } from '../fns/menus'
|
|||
let editor: Editor
|
||||
let underlineMenu: Underline
|
||||
|
||||
test('加粗', () => {
|
||||
test('下划线', () => {
|
||||
editor = createEditor(document, 'div1') // 赋值给全局变量
|
||||
|
||||
// 找到 bold 菜单
|
||||
// 找到 underline 菜单
|
||||
underlineMenu = getMenuInstance(editor, Underline) as Underline
|
||||
|
||||
// 执行点击事件,模拟加粗
|
||||
// 执行点击事件,模拟下划线功能
|
||||
mockCmdFn(document)
|
||||
; (underlineMenu as Underline).clickHandler()
|
||||
expect(document.execCommand).toBeCalledWith('underline', false, undefined) // mock fn 被调用
|
||||
|
|
Loading…
Reference in New Issue