bigbuffet-rw/app/soapbox/normalizers/__tests__/card-test.js

15 lines
373 B
JavaScript
Raw Normal View History

2022-03-16 19:33:09 -07:00
import { Record as ImmutableRecord } from 'immutable';
2022-03-12 13:54:28 -08:00
import { normalizeCard } from '../card';
describe('normalizeCard()', () => {
it('adds base fields', () => {
2022-03-16 19:33:09 -07:00
const card = {};
2022-03-12 13:54:28 -08:00
const result = normalizeCard(card);
expect(ImmutableRecord.isRecord(result)).toBe(true);
expect(result.type).toEqual('link');
expect(result.url).toEqual('');
});
});