https://github.com/exercism/moonscript-test-runner
https://github.com/exercism/moonscript-test-runner
exercism-test-runner exercism-tooling maintained-autonomous
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/exercism/moonscript-test-runner
- Owner: exercism
- License: agpl-3.0
- Created: 2025-12-24T09:50:55.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2026-04-09T17:27:13.000Z (2 months ago)
- Last Synced: 2026-04-09T19:30:10.178Z (2 months ago)
- Topics: exercism-test-runner, exercism-tooling, maintained-autonomous
- Language: MoonScript
- Size: 46.9 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Exercism MoonScript Test Runner
The Docker image to automatically run tests on [MoonScript](https://github.com/exercism/moonscript) solutions submitted to [Exercism].
## Added LuaRocks
For student solutions, these additional luarocks have been added to the test-runner image:
* [lua-tz](https://luarocks.org/modules/anaef/lua-tz)
* [date](https://luarocks.org/modules/tieske/date)
* [luatz](https://luarocks.org/modules/daurnimator/luatz)
## Run the test runner
To run the tests of a single solution, do the following:
1. Open a terminal in the project's root
2. Run `bin/run.moon ${exercise_slug} ${solution_dir} ${output_dir}`
Once the test runner has finished, its results will be written to `${output_dir}/results.json`.
## Run the test runner on a solution using Docker
_This script is provided for testing purposes, as it mimics how test runners run in Exercism's production environment._
To run the tests of a single solution using the Docker image, do the following:
1. Open a terminal in the project's root
2. Run `./bin/run-in-docker.sh ${exercise_slug} ${solution_dir} ${output_dir}`
Once the test runner has finished, its results will be written to `${output_dir}/results.json`.
## Run the tests
To run the tests to verify the behavior of the test runner, do the following:
1. Open a terminal in the project's root
2. Run `./bin/run-tests.sh`
These are [golden tests][golden] that compare the `results.json` generated by running the current state of the code against the "known good" `tests/${test_name}/expected_results.json`. All files created during the test run itself are discarded.
When you've made modifications to the code that will result in a new "golden" state, you'll need to update the affected `tests/${test_name}/expected_results.json` file(s).
## Run the tests using Docker
_This script is provided for testing purposes, as it mimics how test runners run in Exercism's production environment._
To run the tests to verify the behavior of the test runner using the Docker image, do the following:
1. Open a terminal in the project's root
2. Run `./bin/run-tests-in-docker.sh`
These are [golden tests][golden] that compare the `results.json` generated by running the current state of the code against the "known good" `tests/${test_name}/expected_results.json`. All files created during the test run itself are discarded.
When you've made modifications to the code that will result in a new "golden" state, you'll need to update the affected `tests/${test_name}/expected_results.json` file(s).
## Benchmarking
**_NOTE: not implemented_**
There are two scripts you can use to benchmark the test runner:
1. `./bin/benchmark.sh`: benchmark the test runner code
2. `./bin/benchmark-in-docker.sh`: benchmark the Docker image
These scripts can give a rough estimation of the test runner's performance.
Bear in mind though that the performance on Exercism's production servers is often lower.
[test-runners]: https://github.com/exercism/docs/tree/main/building/tooling/test-runners
[golden]: https://ro-che.info/articles/2017-12-04-golden-tests
[exercism]: https://exercism.org