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