vega-frontend-monorepo/apps/token/src/lib/truncate-middle.spec.ts
Art db08a177c4
fix(#806): dissasociation without vega wallet (#1075)
* fix: dissasociation without vega wallet (806)

* fix: removed unused import

* chore: removed redundant func prepend0xIfNeeded

* Update apps/token/src/routes/staking/disassociate/disassociate-page.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update apps/token/src/routes/staking/disassociate/disassociate-page.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
2022-08-23 15:09:08 -07:00

16 lines
438 B
TypeScript

import { truncateMiddle } from './truncate-middle';
describe('truncateMiddle', () => {
it.each([
{ i: '1234567890134567890', o: '123456\u20267890' },
{ i: '12345678901', o: '123456\u20268901' },
{ i: '1234567890', o: '1234567890' },
{ i: '123456', o: '123456' },
])(
'truncates the middle section of any long string (address)',
({ i, o }) => {
expect(truncateMiddle(i)).toStrictEqual(o);
}
);
});