Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukehedger/a45ce5d7043b6802027ab55ccc9b6253 to your computer and use it in GitHub Desktop.
Save lukehedger/a45ce5d7043b6802027ab55ccc9b6253 to your computer and use it in GitHub Desktop.
Anatomy of a Unit Test - Jest
// For each unit test you write,
// answer these questions:
describe('What component aspect are you testing?', () => {
it('What should the feature do?', () => {
const actual = 'What is the actual output?'
const expected = 'What is the expected output?'
expect(actual).toEqual(expected)
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment