bredikhin / sailsjs-mocha-testing-barrels-fixtures-example

An example of Sails.js-project testing with Mocha and Barrels for fixtures
121 stars 22 forks source link

Sails app is undefined #5

Open rhewitt22 opened 9 years ago

rhewitt22 commented 9 years ago

Thanks for setting this repo up -- I wouldn't know where to begin with testing sails otherwise.

No matter what I try I continue to get the same error in my controller/integration tests. I can't get a reference to the sails app from my bootstrap.test.js into my integration tests.

https://stackoverflow.com/questions/31323962/cant-access-sails-js-app-instance-in-integration-tests

bredikhin commented 9 years ago

Off the top of my head, app (to which you're assigning the Sails application in the lift callback) should be global, not defined with var in bootstrap.test.js.