bigbuffet-rw/app/soapbox/utils/__tests__/accounts.test.ts

16 lines
328 B
TypeScript
Raw Normal View History

2022-04-02 19:40:47 -07:00
import { AccountRecord } from 'soapbox/normalizers';
import {
getDomain,
} from '../accounts';
describe('getDomain', () => {
const account = AccountRecord({
acct: 'alice',
url: 'https://party.com/users/alice',
});
it('returns the domain', () => {
expect(getDomain(account)).toEqual('party.com');
});
});