Skip to content

Commit

Permalink
cleanup tests/unit/store/asserts
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Mar 1, 2017
1 parent 3ebd3db commit 8b06cb9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unit/store/asserts-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {module} from 'qunit';
import testInDebug from 'dummy/tests/helpers/test-in-debug';
import {createStore} from 'dummy/tests/helpers/store';

module("unit/store/asserts - DS.Store methods produce useful assertion messages");
module('unit/store/asserts - DS.Store methods produce useful assertion messages');

const MODEL_NAME_METHODS = [
'createRecord',
Expand All @@ -23,12 +23,12 @@ const MODEL_NAME_METHODS = [
'serializerFor'
];

testInDebug("Calling Store methods with no modelName asserts", function(assert) {
testInDebug('Calling Store methods with no modelName asserts', function(assert) {
assert.expect(MODEL_NAME_METHODS.length);
let store = createStore();

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

0 comments on commit 8b06cb9

Please sign in to comment.