Skip to content

Commit 12e4acc

Browse files
committed
add test for shortened address
1 parent d8d0807 commit 12e4acc

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

packages/components/src/components/Address/Address.test.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@ import { Address } from './Address';
55

66
describe('Address', () => {
77
it('renders without throwing', () => {
8-
const { container } = render(<Address value='taylorswift.eth' />);
8+
const { container } = render(<Address value='taylorswift.eth' shortened={false} />);
99
expect(container).toBeInTheDocument();
1010
});
1111
});
12+
13+
describe('Shortened Address', () => {
14+
it('check the length of the address', () => {
15+
const { container } = render(<Address value='0x00000000000000' shortened />);
16+
const addressInput = container.querySelector('input') as HTMLInputElement;
17+
expect(addressInput).toHaveValue('0x00...0000');
18+
});
19+
});

0 commit comments

Comments
 (0)