Skip to content

Instantly share code, notes, and snippets.

@DerZyklop
Last active May 19, 2016 12:26
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 DerZyklop/3b5978959315d5a5f055f29418af23c4 to your computer and use it in GitHub Desktop.
Save DerZyklop/3b5978959315d5a5f055f29418af23c4 to your computer and use it in GitHub Desktop.
opa5-best-practices
// Do
strictEqual(
list.getItems().length,
expectedLength,
"List has expected amount of items"
);
// Don't
if (list.getItems().length === expectedLength) {
ok(true, "List has expected amount of " + expectedLength + " items in " + viewName);
} else {
ok(false, "List does not have expected amount of " + expectedLength + " items in " + viewName);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment