From edb8a77437d95242ec1ddb98667b0c117a2fb36c Mon Sep 17 00:00:00 2001 From: Sukanya Pandey Date: Thu, 29 Oct 2020 11:33:42 +0530 Subject: Resolve custom-event-name-casing lint warnings Signed-off-by: Sukanya Pandey Change-Id: I9eea4eac3b8cacc216fc9ad1011e51622622e75f --- tests/unit/AppHeader.spec.js | 6 +++--- tests/unit/AppNavigation.spec.js | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/unit/AppHeader.spec.js b/tests/unit/AppHeader.spec.js index 6d359c88..1a4075f4 100644 --- a/tests/unit/AppHeader.spec.js +++ b/tests/unit/AppHeader.spec.js @@ -44,11 +44,11 @@ describe('AppHeader.vue', () => { expect(wrapper.emitted('refresh')).toBeTruthy(); }); - it('nav-trigger button click should emit toggle:navigation event', async () => { + it('nav-trigger button click should emit toggle-navigation event', async () => { const rootWrapper = createWrapper(wrapper.vm.$root); wrapper.get('#app-header-trigger').trigger('click'); await wrapper.vm.$nextTick(); - expect(rootWrapper.emitted('toggle:navigation')).toBeTruthy(); + expect(rootWrapper.emitted('toggle-navigation')).toBeTruthy(); }); it('logout button should dispatch authentication/logout', async () => { @@ -59,7 +59,7 @@ describe('AppHeader.vue', () => { it('change:isNavigationOpen event should set isNavigationOpen prop to false', async () => { const rootWrapper = createWrapper(wrapper.vm.$root); - rootWrapper.vm.$emit('change:isNavigationOpen', false); + rootWrapper.vm.$emit('change-is-navigation-open', false); await rootWrapper.vm.$nextTick(); expect(wrapper.vm.isNavigationOpen).toEqual(false); }); diff --git a/tests/unit/AppNavigation.spec.js b/tests/unit/AppNavigation.spec.js index b7065746..ab962046 100644 --- a/tests/unit/AppNavigation.spec.js +++ b/tests/unit/AppNavigation.spec.js @@ -26,20 +26,20 @@ describe('AppNavigation.vue', () => { expect(wrapper.element).toMatchSnapshot(); }); - it('Nav Overlay click should emit change:isNavigationOpen event', async () => { + it('Nav Overlay click should emit change-is-navigation-open event', async () => { const rootWrapper = createWrapper(wrapper.vm.$root); const navOverlay = wrapper.find('#nav-overlay'); navOverlay.trigger('click'); await wrapper.vm.$nextTick(); - expect(rootWrapper.emitted('change:isNavigationOpen')).toBeTruthy(); + expect(rootWrapper.emitted('change-is-navigation-open')).toBeTruthy(); }); - it('toggle:navigation event should toggle isNavigation data prop value', async () => { + it('toggle-navigation event should toggle isNavigation data prop value', async () => { const rootWrapper = createWrapper(wrapper.vm.$root); wrapper.vm.isNavigationOpen = false; - rootWrapper.vm.$emit('toggle:navigation'); + rootWrapper.vm.$emit('toggle-navigation'); expect(wrapper.vm.isNavigationOpen).toBe(true); - rootWrapper.vm.$emit('toggle:navigation'); + rootWrapper.vm.$emit('toggle-navigation'); expect(wrapper.vm.isNavigationOpen).toBe(false); }); }); -- cgit v1.2.3