sailsjs-mocha-testing-barrels-fixtures-example icon indicating copy to clipboard operation
sailsjs-mocha-testing-barrels-fixtures-example copied to clipboard

Sails app is undefined

Open rhewitt22 opened this issue 9 years ago • 1 comments

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

rhewitt22 avatar Jul 09 '15 18:07 rhewitt22

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.

bredikhin avatar Jul 12 '15 02:07 bredikhin