Skip to main content Link Search Menu Expand Document (external link)

Development

Logging levels

We use Consola for debugging. As such you can set the CONSOLA_LEVEL environment variable ins development to get different logging levels. E.g. 4 for debug. See available levels here

Tests

E2E Cypress tests

To run Cypress tests start a mock API in one terminal

API_PORT=3100 yarn api

Build and start the demo application to run your tests

yarn demo:buld
yarn demo:start

Run the test

yarn e2e

For development you can start the application in dev mode for hot-reloading

TESTING=true DISABLE_HTTPS=true API_URL=http://localhost:3100 yarn dev

And run Cypress tests manually with the GUI

yarn e2e:open

Jest unit tests

Run the following command to execute Jest unit tests

yarn test

Running a real API

If you wat to run a real API, take a look at the Components Web App template application. You can easily run the API locally with Docker Compose and adjust your environment variables so this module uses the correct API endpoint. By default, the template application’s API runs at https://localhost:8443


Copyright © 2018-2020 Silverback IS. Distributed by an MIT license.