I have a fixture create which looks somewhat like this.
// mirage/fixtures/people.js
export default {
'people': [
{
'id': 1,
'name': 'Ram',
},
{
'id': 2,
'name': 'Raja',
}
]
}
Inside my acceptance test I'm using this array. But within my test, I want to modify this people array and add, suppose another object
{
'id': 3,
'name': 'John',
}
Note: I dont want to use factories as I dont want all datas to be dynamically generated, so I want to take this array from fixtures, push my new object into this array and then return it. What is the correct way to do it?
Note2: Don't suggest adding this object in fixtures itself, because I want to dynamically add items to the fixture based on conditions in my test.