Rethink project structure
I'd like to rethink the project structure so there's a clearer separation between the harness and the tests and the tests are easier to find. Here's the structure I have in mind:
bin/
docs/
tests/
block/
paragraph/
single-line-input.adoc
single-line-output.json
lib/
index.js
harness/
runner.js
adapters/
asciidoctor.js
test/
runner-test.js
I think the tests (the primary suite of tests that the TCK provides) should be a top-level folder to make them easy to discover (since they are the most important part of this repository). Notice I've renamed this folder from fixtures
. Even though they are files, they are not fixtures. They are data-driven (file-based) tests (sometimes called doctests). The assertion for each test case is implicit (processor must produce output from input).
As for the harness, I'm still debating whether it should go into lib/
(as I have above) or test-harness
. The benefit of putting it in test-harness
is that it could encapsulate the test suite for the harness itself. In other words:
...
test-harness/
lib/
index.js
runner.js
adapters/
asciidoctor.js
test/
runner-test.js
Using this structure, the test harness acts someone like a subproject. I think I prefer it because then it is very clear that the tests
folder at the top level contains the primary suite of tests (in other words, we don't end up with tests
as a sibling of test
).