bigbuffet-rw/app/soapbox/normalizers/__tests__/notification.test.ts
marcin mikołajczak 5fec879148 Fix mutes test, prefer TypeScript for tests
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-06-12 16:30:48 +02:00

17 lines
538 B
TypeScript

import { Record as ImmutableRecord } from 'immutable';
import { normalizeNotification } from '../notification';
describe('normalizeNotification()', () => {
it('normalizes an empty map', () => {
const notification = {};
const result = normalizeNotification(notification);
expect(ImmutableRecord.isRecord(result)).toBe(true);
expect(result.type).toEqual('');
expect(result.account).toBe(null);
expect(result.target).toBe(null);
expect(result.status).toBe(null);
expect(result.id).toEqual('');
});
});