bigbuffet-rw/app/soapbox/normalizers/__tests__/card-test.js
2022-03-12 15:54:28 -06:00

14 lines
389 B
JavaScript

import { Record as ImmutableRecord, fromJS } from 'immutable';
import { normalizeCard } from '../card';
describe('normalizeCard()', () => {
it('adds base fields', () => {
const card = fromJS({});
const result = normalizeCard(card);
expect(ImmutableRecord.isRecord(result)).toBe(true);
expect(result.type).toEqual('link');
expect(result.url).toEqual('');
});
});