Skip to content

Instantly share code, notes, and snippets.

@jonpitch
Last active July 27, 2016 19:06
Show Gist options
  • Save jonpitch/eb3bed80fb5f9031dd9cc5c7519e5ee9 to your computer and use it in GitHub Desktop.
Save jonpitch/eb3bed80fb5f9031dd9cc5c7519e5ee9 to your computer and use it in GitHub Desktop.
write better ember tests - be verbose
test('this is a dummy test', function(assert) {
const a = true;
const b = true;
// a developer can quickly scan these messages to understand what
// needs to happen and why.
assert.ok(a, 'A is true when X');
assert.equal(a, b, 'A and B are equal when X');
});
// bad - what part of login are we testing?
test('login', function(assert) {
// ...
});
// good - i know exactly what this test is doing
test('user can successfully log in', function(assert) {
// ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment