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:
- Did the hook's default config make it into
sails.config
? - Did
sails.load
work as expected with the hook enabled and all the hooks it depends on enabled? - Did
sails.lift
work as expected with the hook enabled and all the hooks it depends on enabled? - Post-
sails.load
, is the process/application state correct? (i.e. did the hook do what it was supposed to do?) - Did the hook do what it was supposed to do after tearing down the server using
sails.lower()
?
We could really use more tests for the following cases:
- If we
sails.load
usingloadHooks
to allow only specific hooks, orhooks
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 thatsails.load
should fail with a relevant error message and should not hang in this case.