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

15 lines
389 B
JavaScript
Raw Normal View History

2022-03-12 13:54:28 -08:00
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('');
});
});