Skip to content

Commit

Permalink
cleanup'
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed May 22, 2024
1 parent 44bb2da commit 6c97308
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/model/src/-private/schema-provider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { getOwner } from '@ember/application';
import { deprecate } from '@ember/debug';

import type Store from '@ember-data/store';
import type { SchemaService } from '@ember-data/store/types';
Expand All @@ -17,7 +18,6 @@ import type {
import type { FactoryCache, Model, ModelFactory, ModelStore } from './model';
import _modelForMixin from './model-for-mixin';
import { normalizeModelName } from './util';
import { deprecate } from '@ember/debug';

type AttributesSchema = ReturnType<Exclude<SchemaService['attributesDefinitionFor'], undefined>>;
type RelationshipsSchema = ReturnType<Exclude<SchemaService['relationshipsDefinitionFor'], undefined>>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,16 @@ module('unit/model - Custom Class Model', function (hooks: NestedHooks) {
assert.verifySteps(['TestSchema:fields', 'TestSchema:fields'], 'population of record on create');
await person.save();
assert.verifySteps(
[
'TestSchema:hasResource',
'TestSchema:hasResource',
'TestSchema:hasResource',
'TestSchema:fields',
'TestSchema:fields',
'TestSchema:fields',
],
DEBUG
? [
'TestSchema:hasResource',
'TestSchema:hasResource',
'TestSchema:hasResource',
'TestSchema:fields',
'TestSchema:fields',
'TestSchema:fields',
]
: ['TestSchema:hasResource', 'TestSchema:fields', 'TestSchema:fields', 'TestSchema:fields'],
'update of record on save completion'
);
});
Expand Down

0 comments on commit 6c97308

Please sign in to comment.