After installation, you can run the tests with
npm run test
npm run test:integration
npm run test:e2e
npm run test:h5p-mongos3 # (require running MongoDB server)
You can run the e2e tests with h5p packages on your local system like this:
H5P_FILES=test/data/hub-content ERROR_FILE=errors.txt npm run test:server+upload
The library emits log messages with
debug. To see those messages you have to
set the environment variable DEBUG
to h5p:*
. There are several log levels.
By default you'll only see the messages sent with the level info
. To get the
verbose log, set the environment variable LOG_LEVEL
to debug (mind the
capitalization).
Example (for Linux):
DEBUG=h5p:* LOG_LEVEL=debug node script.js
Check out the many other npm scripts in package.json for other development functionality.
Check out this page for more details on how to update the H5P core files when there is a new release of the H5P core or the H5P editor core.
We aim at achieving high code quality by following these principles:
You can check whether your own code passes most of these requirements by running
npm run ci
(doesn't include tests requiring a database).