Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Aug 11, 2022
1 parent c8fc274 commit 5cf0ebf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ module('unit/model - Custom Class Model', function (hooks) {
store.push({ data: { id: '1', type: 'person', attributes: { name: 'chris' } } });
recordData.storeWrapper.notifyChange(identifier, 'relationships', 'key');
recordData.storeWrapper.notifyChange(identifier, 'relationships', 'key');
recordData.storeWrapper.notifyChange(identifier, 'state', 'key');
recordData.storeWrapper.notifyChange(identifier, 'errors', 'key');
recordData.storeWrapper.notifyChange(identifier, 'state');
recordData.storeWrapper.notifyChange(identifier, 'errors');
await settled();

assert.strictEqual(notificationCount, 3, 'called notification callback');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class NotificationManager {
// notify(identifier: StableRecordIdentifier, value: 'errors' | 'meta' | 'identity' | 'state'): boolean;
notify(identifier: StableRecordIdentifier, value: NotificationType, key?: string): boolean {
assert(
`Notify does not accept a key argument for the namespace ${value}. Received ${key}.`,
`Notify does not accept a key argument for the namespace '${value}'. Received key '${key}'.`,
!key || value === 'attributes' || value === 'relationships'
);
if (!isStableIdentifier(identifier)) {
Expand Down

0 comments on commit 5cf0ebf

Please sign in to comment.