I try to use ember-cli-mirage for tests purposes. I have a lot of Ember data models with computed properties. When i'm creating a Mirage model instance, it seems that computed properties are not available. I was wondering if i'm making something wrong of if there's a way to get computed properties works ?
// app/models/profile.js
import DS from 'ember-data';
export default DS.Model({
firstName: attr('string'),
lastName: attr('string'),
fullName: computed('firstName', 'lastName', function() {
// return ...
})
});
// Create profile instance...
let profile = server.create('profile', { firstName: 'Tom', lastName: 'Stran' });
profile.firstName // Tom
profile.lastName // Stran
profile.fullName // undefined
profile.get('fullName') // profile.get is not a function
Thanks you !