I have a timestamp field in my table which I'm trying to mock, however it seems to simply get returned as a string when using sequelize-mocking. It might be an idea to expose transformFixtureDataFn from sequelize-fixtures to do something like the following:
sequelize_fixtures.loadFile('fixtures/users.json', models, {
transformFixtureDataFn: function (data) {
if(data.createdAt) {
data.createdAt = new Date(data.createdAt);
}
return data;
}
})
I have a timestamp field in my table which I'm trying to mock, however it seems to simply get returned as a string when using sequelize-mocking. It might be an idea to expose
transformFixtureDataFn
from sequelize-fixtures to do something like the following: