Created
March 4, 2020 08:38
-
-
Save rbinksy/618b28af0064c883d8df7b463d38b5ee to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Healthbar } from './Healthbar'; | |
import { render } from '@testing-library/react'; | |
test('show current health', () => { | |
const { getByText } = render( | |
<Healthbar position="left" playerName="Example Name" health={32} /> | |
); | |
expect(getByText('32')); | |
}); | |
test('show current player name', () => { | |
const { getByText } = render( | |
<Healthbar position="left" playerName="Example Name" health={32} /> | |
); | |
expect(getByText('Example Name')); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment