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
As a newcomer to Sails and Barrels, I had a hard time to figure out in which format the fixtures should be. I kept thinking how should I create the fixtures, should I just wrote the files, in which format, et cetera. By consuming time to examine the files under test/fixtures/, I now know that they have a structure that is somehow related to the model attributes.
What do you think, is the documentation lacking in this matter? Even a tiny example.json fixture in the README.md with proper description might do the job.
The text was updated successfully, but these errors were encountered:
@bredikhin Thank you for the quick reply. Currently I do not have enough knowledge about the required fixture files to write documentation about them but if that day comes, I might submit a PR. Should the fixtures always be arrays of objects? Should the properties of the objects match the attributes of Sails Models? Is there some special properties? For example, the model test/fixtures/models/Product.js has attribute name, and the fixture product.js uses property title. Is either one a special value? What if some of the attributes are not given? Is it necessary to give all the attributes?
I am sorry for being difficult, so to say, but I am trying to express the variety of questions running in the mind of a dev that is new to Sails and Barrels.
The best way to learn is to actually read the code and the existing docs. I'm pretty sure it'll let you come up with a good level of understanding and maybe a comprehensive PR if you feel like it.
As a newcomer to Sails and Barrels, I had a hard time to figure out in which format the fixtures should be. I kept thinking how should I create the fixtures, should I just wrote the files, in which format, et cetera. By consuming time to examine the files under test/fixtures/, I now know that they have a structure that is somehow related to the model attributes.
What do you think, is the documentation lacking in this matter? Even a tiny example.json fixture in the README.md with proper description might do the job.
The text was updated successfully, but these errors were encountered: