Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
KKA11010 committed Apr 3, 2024
1 parent c95d461 commit 576c830
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/components/Balance.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ describe('Basic test of the Txt.tsx component', () => {
beforeEach(() => jest.clearAllMocks())
// Start tests
it('renders the expected string', () => {
render(<Balance balance={69} />)
const textElement = screen.getByText('69')
render(<Balance />)
const textElement = screen.getByText('0')
expect(textElement).toBeDefined()
})
it('updates the balance format state on press', () => {
render(<Balance balance={69} />)
const touchableElement = screen.getByText('69')
render(<Balance />)
const touchableElement = screen.getByText('0')
// Simulate press event
fireEvent.press(touchableElement)
expect(touchableElement.props.children).toBe('0.00000069')
expect(screen.getByText('0.00000000')).toBeDefined()
})
})
})

0 comments on commit 576c830

Please sign in to comment.