Create a gist now

Instantly share code, notes, and snippets.

Embed
Anatomy of a Unit Test
import test from 'tape';
// For each unit test you write,
// answer these questions:
test('What component aspect are you testing?', assert => {
const actual = 'What is the actual output?';
const expected = 'What is the expected output?';
assert.equal(actual, expected,
'What should the feature do?');
assert.end();
});
@terkelg

This comment has been minimized.

Show comment
Hide comment
@terkelg

terkelg Jul 27, 2016

Thanks, Super helpful!
For those who didn't come here directly from the article, you should check it out:
5 Questions Every Unit Test Must Answer
.

terkelg commented Jul 27, 2016

Thanks, Super helpful!
For those who didn't come here directly from the article, you should check it out:
5 Questions Every Unit Test Must Answer
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment