source-academy/js-slang

Test js-slang behaviour individually

Opened this issue · 0 comments

Refer to the deleted test cases in #1469.

Restoring them would cause the stepper to fail, but at the same time, it does not make much sense to come up with extra set up (or potentially teardown) logic for each test case.

Proposal:

Similar to how TypeScript has compiler flags to enable/disable certain behaviours, perhaps we can disable some behaviour during unit tests and enable them by default in the built release.

That way, individual unit tests will also be less coupled to one another. Otherwise, as we add more features, it may get harder and harder to unit test them.