# Render Test Cases from JS

## Context

For the first 10 test cases, the process for each one started with writing a human readable specification of the test case in markdown. Then, later, we'd implement this specification in JavaScript, and other implementations of the test specification would be equally valid.

Ultimately it does feel ideal to define some tests in terms of a human readable specification, which is primary compared to specific implementations.

But it also can be useful to prototype a new test case by jumping straight into JavaScript.
For these Test Case objects, they have no `markdown` property, because no markdown was written before the JS itself.

For these JS Test Cases, it would be nice to be able to render them into markdown and/or html so that they can appear in webpages listing test cases etc, but without the developer having to write a whole test spec in markdown in addition to the JS.

Good test case `http://localhost:8080/test-cases/outbox-wraps-object-with-create-checked-using-get-location`

## How it works

* [../website/test-cases/index.webc](../website/test-cases/index.webc)

## Plan

* [x] render requirementReference in the default template
* [x] add table of contents and section links
* [x] render [test rule test cases](https://www.w3.org/TR/act-rules-format/#test-cases)
* [ ] render test targets descriptions
* [ ] render how to derive test targets from input
* [ ] render [expectations](https://www.w3.org/TR/act-rules-format/#expectations) for the test targets
* [ ] render outcome
* [ ] render [applicability](https://www.w3.org/TR/act-rules-format/#applicability)
