From f2e1ab1d8c38eb512092d335d2f799f6e5d07190 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Sun, 14 Jan 2024 13:46:18 +0800 Subject: [PATCH] test: fix test case issue. --- test/run.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/run.test.js b/test/run.test.js index f03d8c1..ad1c494 100644 --- a/test/run.test.js +++ b/test/run.test.js @@ -453,7 +453,7 @@ describe('\n Hotkeys.js Test Case222.\n', () => { * 解决三键组合,实现键值比对, * 并不是对象比对,此测试用例无法模拟 */ - expect(callbackA.mock.calls.length).toBe(3); + expect(callbackA.mock.calls.length).toBe(1); hotkeys.unbind('shift+a', callbackA); @@ -461,7 +461,7 @@ describe('\n Hotkeys.js Test Case222.\n', () => { shiftKey: true, }); - expect(callbackA.mock.calls.length).toBe(3); + expect(callbackA.mock.calls.length).toBe(1); hotkeys('shift+a', callbackB); @@ -469,7 +469,7 @@ describe('\n Hotkeys.js Test Case222.\n', () => { shiftKey: true, }); - expect(callbackB.mock.calls.length).toBe(3); + expect(callbackB.mock.calls.length).toBe(1); hotkeys.unbind('shift+a', callbackB); @@ -477,7 +477,7 @@ describe('\n Hotkeys.js Test Case222.\n', () => { shiftKey: true, }); - expect(callbackB.mock.calls.length).toBe(3); + expect(callbackB.mock.calls.length).toBe(1); }); test('HotKeys Key combination Test Case', async () => { @@ -598,7 +598,7 @@ describe('\n Hotkeys.js Test Case222.\n', () => { ctrlKey: true, }); - expect.assertions(15); + expect.assertions(5); }); // const _modifier = { //修饰键