diff --git a/webapp/components/NotificationList/NotificationList.spec.js b/webapp/components/NotificationList/NotificationList.spec.js index ce20a2765..219c1fdbb 100644 --- a/webapp/components/NotificationList/NotificationList.spec.js +++ b/webapp/components/NotificationList/NotificationList.spec.js @@ -81,4 +81,23 @@ describe('NotificationList.vue', () => { }) }) }) + + describe('shallowMount with no notifications', () => { + const Wrapper = () => { + return shallowMount(NotificationList, { + propsData: {}, + mocks, + store, + localVue, + }) + } + + beforeEach(() => { + wrapper = Wrapper() + }) + + it('renders Notification.vue zero times', () => { + expect(wrapper.findAll(Notification)).toHaveLength(0) + }) + }) }) diff --git a/webapp/components/NotificationList/NotificationList.vue b/webapp/components/NotificationList/NotificationList.vue index 877133f39..fd2d6366c 100644 --- a/webapp/components/NotificationList/NotificationList.vue +++ b/webapp/components/NotificationList/NotificationList.vue @@ -20,7 +20,7 @@ export default { props: { notifications: { type: Array, - default: [], + default: () => [], }, }, methods: {