barrels icon indicating copy to clipboard operation
barrels copied to clipboard

populate fixtures got error in Sails test

Open chenweiyj opened this issue 9 years ago • 2 comments

When I use this library to populate fixture data for my sails app, I got error as follows.

model[attr] = that.idMap[joined][item[attr]-1];
                                              ^
TypeError: Cannot read property '0' of undefined

chenweiyj avatar Jan 19 '16 06:01 chenweiyj

Please provide example fixture files, test code, etc.

bredikhin avatar Jan 19 '16 14:01 bredikhin

This may means you didn't add fixture file name into loadOrder argument. Just debugged same.

barrels.populate(loadOrder, function(err) {
        done(err, sails);
      });

I think there is lack of logging in module.

srhlv avatar Feb 28 '16 06:02 srhlv