src/lib.rs contains the 2 main entrypoints of the code:
- run_scheduler()
- this is the main entry point for calling the scheduling algorithm as a Rust program
- schedule()
- this is the entry point for the exposed WASM module. should do the same as run-scheduler, without the logging.
Functions, and implementations are tested with standard unit tests.
The folder root/tests/jsons contains expected in- and corresponding outputs for end-to-end test scenarios. The code to run them is auto-generated at compile time.
We can also run the tests in a javascript environment as WASM=module using Deno as javascript runtime. The entrypoint for these tests is tests/deno_tests.ts, and it can be run by executing ./scripts/deno_tests.sh. This is meant as an integration test to see everything runs fine in a javascript context.
The tests are divided into 2 testsets: stable and experimental. Stable tests always run. The other testset can be run by providing the right feature flag (see Cargo.toml)