This library contains all the shared code that is common across all platforms (application types).
It includes the business logic necessary for communicating with the signageOS
platform service.
In addition, it includes the Emulator, an implementation of the display that can be conveniently used for development purposes in modern browsers such as Chrome.
cp -n config/env.\{amy\}.json config/env.dev.json # only for the first time
npx husky install # only for the first time
npm run develop
To run unit and integration tests in Node.js environment use the following command:
npm test
To run browser tests in the Chrome Headless environment use the following command:
npm run test-browser
By default, the browser tests run in single run mode. If you want to monitor changes and develop your code more quickly, use the following command:
npm run test-browser -- --no-single-run
.
The Browser environment only contains a subset of tests that are practical to run in a near-real browser environment (e.g., for using real browser APIs like CacheStorage, IndexedDB, ServiceWorkers, etc.).
Generally, the browser environment is slow and impractical for developing unit tests.