diff --git a/packages/x6-common/src/__tests__/dom/event.test.ts b/packages/x6-common/src/__tests__/dom/event.test.ts index ad73f0026ee..e64520194bb 100644 --- a/packages/x6-common/src/__tests__/dom/event.test.ts +++ b/packages/x6-common/src/__tests__/dom/event.test.ts @@ -294,10 +294,16 @@ describe('EventDom', () => { expect(() => div.off('click', false)).not.toThrowError() }) - it('should do noting for elem which do not bind any events', () => { + it('should do nothing for elem which do not bind any events', () => { const div = new EventDom() expect(() => div.off()).not.toThrowError() }) + + it('should do nothing for unexist event', () => { + const div = new EventDom() + div.on('whatever', () => {}) + expect(() => div.off('unexist')).not.toThrowError() + }) }) describe('trigger()', () => {