Closed mrshu closed 10 years ago
Sails was not designed to be a full-framework, there are some that do that. The way is to do like you did, use already done modules to do that... Think in Sails, as a easy RESTfull API for your app, the 'rest', is the rest...
Very good! now I got it!
Thanks for the explanation @ivanseidel.
If you are satisfied with this Pull Request, feel free to merge it in.
This pull request adds some basic tests that were really badly needed.
It's quite difficult to get tests running with sails -- it obviously was not written with tests in mind.
I used this example repository as a starting point (github.com/bredikhin/sailsjs-mocha-testing-barrels-fixtures-example) and tried to import some team fixtures from @ivanseidel's demo.
Right now it does not actually test anything important but that will change in the future.
Also, please note that I moved the
calculateScoreTable
function into the model to keep it a bit more sane (so that there is nothis
out of context).