You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixture function created by $.fixture.make filters out any fixtures when request parameter contain "Id" or "_id" string and there is no way to turn this off.
if(settings.data[param]!==undefined&&// don't do this if the value of the param is null (ignore it)(param.indexOf("Id")!=-1||param.indexOf("_id")!=-1)){while(i<retArr.length){if(settings.data[param]!=retArr[i][param]){retArr.splice(i,1);}else{i++;}}}
The idea of automatic filter by id-like parameter is OK but this feature should be optional.
Example of problem test case:
We have something like MyModel.findAll({parentId: xxx}) in our code but we don't have parentId property on MyModel class. For us parentId is just search parameter. We handle it in our custom filter passed to $.fixture.make. However code from fixutre.js filters out all our fixtures because they don't have parentId property and we can't turn this behavior off.
The text was updated successfully, but these errors were encountered:
Fixture function created by $.fixture.make filters out any fixtures when request parameter contain "Id" or "_id" string and there is no way to turn this off.
Code from dom/fixture/fixture.js:
The idea of automatic filter by id-like parameter is OK but this feature should be optional.
Example of problem test case:
We have something like
MyModel.findAll({parentId: xxx})
in our code but we don't haveparentId
property on MyModel class. For usparentId
is just search parameter. We handle it in our customfilter
passed to $.fixture.make. However code from fixutre.js filters out all our fixtures because they don't haveparentId
property and we can't turn this behavior off.The text was updated successfully, but these errors were encountered: