You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To address an issue raised in the blog, I wanted to suggest an easy way to start adding tests that doesn't require installing or learning to use any tooling (e.g. of the kind that professional software developers normally use).
But writing this text (particularly the first-order logic sections) has brought me close to the limit of my programming ability, as the number of bugs introduced with each new feature implemented has begun to grow at an alarming rate.
The idea is to add a test.html file which, when viewed locally, loads and runs a file called test.js. The test.js file can contain tests of functions in the other JS files (e.g. functions which are more bug-prone or otherwise difficult to get right). To start out, the tests can be simple, hand-coded assertions that raise or display an error on failure. Helper test functions could be added to facilitate making assertions, and test inputs and corresponding expected outputs could be stored in arrays to make the tests more compact.
If a test framework is later added, the hand-coded tests could be adapted to fit into whatever framework is used.
The text was updated successfully, but these errors were encountered:
To address an issue raised in the blog, I wanted to suggest an easy way to start adding tests that doesn't require installing or learning to use any tooling (e.g. of the kind that professional software developers normally use).
The purpose would be to address the following comment in the "QED version 2.0: an interactive text in first-order logic" blog post:
The idea is to add a
test.html
file which, when viewed locally, loads and runs a file calledtest.js
. Thetest.js
file can contain tests of functions in the other JS files (e.g. functions which are more bug-prone or otherwise difficult to get right). To start out, the tests can be simple, hand-coded assertions that raise or display an error on failure. Helper test functions could be added to facilitate making assertions, and test inputs and corresponding expected outputs could be stored in arrays to make the tests more compact.If a test framework is later added, the hand-coded tests could be adapted to fit into whatever framework is used.
The text was updated successfully, but these errors were encountered: