Browser CONsole Test Runner, or BCONTR.
Pronounced “Baconator”, written bcontr
or bcontr.js
.
bcontr.js
is a small library for use by code educators to allow them to write a specific kind of assignment, one that:
- is unit-test-driven, to give learners fast feedback on whether their code meets requirements
- is runnable in a browser to avoid complex terminal setups for new coders
- welcomes learners with easy-to-parse test failures
We are currently at version 0.2, so the API is still unstable, and we have plans to significantly overhaul it.
However, the proof of concept is there. It works and it is glorious.
This section will be expanded once the API has settled down. For now, feel free to check out the example assignment to see how it can be used.
Include the following tag in the <head>
tag of your HTML file:
<script src="https://cdn.jsdelivr.net/gh/abbreviatedman/[email protected]/index.js"></script>
Write tests in a separate JavaScript file. Load that file after bcontr.js
.
See the example assignment to see an example of how to load it in, as well as what these tests could look like.
We welcome new contributors!
If you want to contribute, please have some experience using the test runner with an assignment. The example bcontr.js assignment repo is a helpful resource for testing the current release.
bcontr.js
is released under the GPL v3 license. Your contributions will be as well.
If you’d like to contribute:
- Submit an issue with a feature request or potential bug so it can be discussed. This ensures your work fits a need and the project’s vision.
- Let us know in this discussion that you’d like to contribute to the issue.
- If approved, work in your fork of the repository.
- Once your draft is complete, open a pull request to the
development
branch. - Take part in the discussion before the pull request is merged—if your contribution needs feedback and revision, that discussion will happen in the pull request comments.
- Be patient—once your contribution is merged into the
development
branch, it should soon make its way into a new release via themain
branch. - Once your contribution is part of the project: celebrate! Well done.