@WrRan
2016-11-24T08:29:47.000000Z
字数 1187
阅读 1131
sails
The goal of these tests is to run Sails just like you or I would, and verify that no anomolies have been introduced in general.
This is a great place to jump in if you're interested in contributing code to Sails core!
We could use your help writing more integration tests that test Sails under specific conditions.
When writing an integration tests that verifies the behavior of a particular hook, the following assertions should be made:
sails.config
?sails.load
work as expected with the hook enabled and all the hooks it depends on enabled?sails.lift
work as expected with the hook enabled and all the hooks it depends on enabled?sails.load
, is the process/application state correct? (i.e. did the hook do what it was supposed to do?)sails.lower()
?We could really use more tests for the following cases:
sails.load
using loadHooks
to allow only specific hooks, or hooks
to disable particular hooks, only the specified hooks should actually be loaded.sails.load()
should fail if a test tries to load a hook that depends on other hooks, but those other hooks are disabled. Note that sails.load
should fail with a relevant error message and should not hang in this case.