pleroma/app/soapbox/normalizers/__tests__/notification-test.js

18 lines
554 B
JavaScript
Raw Normal View History

2022-03-11 10:13:36 -08:00
import { Record as ImmutableRecord, fromJS } from 'immutable';
import { normalizeNotification } from '../notification';
describe('normalizeNotification()', () => {
it('normalizes an empty map', () => {
const notification = fromJS({});
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('');
});
});