-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Add module for writing unit tests #121
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! I think that this test module that you have written will definitely be a hit among the source academy cadets! Too bad this wasn't yet implemented when I was taking 1101s haha.
The comments I added are generally my opinion (pls don't take any offence) and feel free to contact me if you wish to discuss or argue against any of the points I wrote so that we can learn together as well! :)
This PR is still marked as "draft". @podocarp: Or is it ready for final review? |
Have not written docs yet, but hope someone can look at the code first. |
Description
Usually testing of programs in source academy is done by commenting and uncommenting code. This is a great big hassle. I have also noticed that students usually only run a single test at a time and comment/uncomment
every single line manually, which makes it even slower. Thus it would be great if we could introduce proper unit testing into Source.
This module adds a few function for writing tests and asserts, as well as a new tab to report on test statuses.
I have generally tried to keep to a style similar to
jest
.Future extensions:
Type of change
How Has This Been Tested?
Added unit tests, as well as manual testing.
Checklist: