it('is not a match with different props', () => { const message = new Message('error', { ...fakeData }); const other = new Message('error', { ...fakeData, message: 'different message', }); expect(message.matches(other)).toBeFalsy(); });
it('is not a match with props the same except type', () => { const message = new Message('error', { ...fakeData }); const other = new Message('warning', { ...fakeData }); expect(message.matches(other)).toBeFalsy(); });
it('is a match if the props are all the same', () => { const message = new Message('error', { ...fakeData }); const other = new Message('error', { ...fakeData }); expect(message.matches(other)).toBeTruthy(); });