Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/building-testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,21 @@ To generate reference rendering use the Developer tool located at
``tools/developer.html``. Make sure to explicitly select your language in the
drop-down menu, as automatic detection is unlikely to work in this case.

Skipped markup tests (unsupported edge cases)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The suite must not ship failing markup tests. For edge cases that are not
supported yet (or are tracked as future work), commit the pair with a
``.skip`` suffix on the base name:

* ``test/markup/<language>/<test_name>.skip.txt``
* ``test/markup/<language>/<test_name>.skip.expect.txt``

These are registered with Mocha as skipped tests: they appear in the report
but do not fail CI. Prefer this over omitting the case entirely so the gap
stays visible. Link a tracking issue in the PR or a nearby comment when you
add a skip.


Building and Testing with Docker
--------------------------------
Expand Down
6 changes: 5 additions & 1 deletion test/markup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,12 @@ function testLanguage(language, {testDir}) {
filenames.forEach(function(filename) {
const testName = path.basename(filename, '.expect.txt');
const sourceName = filename.replace(/\.expect/, '');
// `name.skip.txt` + `name.skip.expect.txt` marks an unsupported edge case
// (see docs/building-testing.rst). Kept for a roadmap without failing CI.
const skipped = testName.endsWith('.skip');
const run = skipped ? it.skip : it;

it(`should markup ${testName}`, function(done) {
run(`should markup ${testName}`, function(done) {
const sourceFile = fs.readFile(sourceName, 'utf-8');
const expectedFile = fs.readFile(filename, 'utf-8');

Expand Down