test:修改测试内容中的部分描述和名称

This commit is contained in:
NeverSellSuteAC 2020-06-18 22:30:22 +08:00
parent 2675c8e401
commit a9a3aa22b0
1 changed files with 3 additions and 3 deletions

View File

@ -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 被调用