'how can i run a sails server in jest unit testing

1 The documentation for Sails 0.12.11 explains how to set up testing using the Mocha framework. I would like to use Jest to do that.

I tried using the same code for bootstrap.test.js, but replacing before with beforeAll and after with afterAll; replacing this.timeout(5000) with jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000. Because Jest expects at least one test in a file, I made a dummy test there to make sure it did not complain.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source