In Ember js, how to create or mock hasMany relationship in unit test
问题 I'm unit-testing a model which has properties with DS.hasMany() relationships. Whenever I do the following unit-test, I keep getting this error in my test-runner: Error: Assertion Failed: All elements of a hasMany relationship must be instances of DS.Model, you passed [<Ember.Object:ember367>,<Ember.Object:ember368>] Can someone shed some light into this, please? Model: export default DS.Model.extend({ accounts: DS.hasMany('account'), servicesAccounts: DS.hasMany('services-account'), address: