@joystick.js/test

settings.test.json

How to define a settings file for running tests in Joystick.

To keep your code as isolated as possible, when running tests, Joystick expects you to have a settings file located in the root of your app at /settings.test.json. The structure of this file should follow the standard process for defining settings for your app, however, its contents should be specific to writing your tests.

Databases

If you'd like to access your app's database in tests, it's important that the config.databases array in your settings.test.json file has the same databases defined as your settings.development.json file (and other environment settings files). This ensures that the tests you write accessing the database are consistent with your actual application code and that your tests are not fragile.