Skip to content

Commit

Permalink
Create many asserts instead of many test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
courajs committed Mar 5, 2016
1 parent 320347d commit f6ea6da
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/unit/store/asserts-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,13 @@ const MODEL_NAME_METHODS = [
'serializerFor'
];

MODEL_NAME_METHODS.forEach(function(methodName) {
test(`Calling Store#${methodName} with no type asserts`, function(assert) {
let store = createStore();
test("Calling Store methods with no type asserts", function(assert) {
assert.expect(MODEL_NAME_METHODS.length);
let store = createStore();

MODEL_NAME_METHODS.forEach(function(methodName) {
assert.expectAssertion(function() {
store[methodName](null);
}, new RegExp(`You need to pass a type to the store's ${methodName} method`));
});
});

// test("pushPayload", function(assert) {
// assert.expect(1);
//
// });

0 comments on commit f6ea6da

Please sign in to comment.