Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/ember-cli-mirage/addon/utils/ember-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ export const hasEmberData =
@hide
*/
export function isDsModel(m) {
return m && typeof m.eachRelationship === 'function';
return m && typeof m.eachRelationship === 'function' && m.isModel === true;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if isModel will be true for all classes we want to check

}
10 changes: 10 additions & 0 deletions test-packages/01-basic-app/app/models/shim.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Mimics the static apis of ShimModelClass from ember-data
export default class Shim {
fields;
attributes;
relationshipsByName;

eachAttribute() {}
eachRelationship() {}
eachTransformedAttribute() {}
}
Comment on lines +1 to +10
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I add this file without the fix, this package's test suite fails
image