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

18 lines
412 B
TypeScript
Raw Normal View History

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