w3c / did-test-suite

W3C DID Test Suite and Implementation Report

Home Page:https://w3c.github.io/did-test-suite/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean up normative statements test `it()` blocks

msporny opened this issue · comments

We need to audit the entire test suite against the specification. In order to do so, we need to know (easily) which section certain tests come from. The easiest way to do this would be to state the exact section name right before the normative language in each it() block in the test:

For example, it's easy to know where this normative language came from:

6.3.1 JSON-LD Production - The DID document and any DID document data structures expressed by the data model MUST be serialized to the JSON-LD representation according to the JSON representation production rules as defined in § 6.2 JSON.

To contrast, it's difficult to know where the following normative language came from:

This input is REQUIRED, but the structure MAY be empty.
A conformant DID URL as a single string.

Can each of you assigned to this issue please go through your tests again and make sure you're specifying which section the normative statement you're testing is coming from?

Anyone not doing this for their tests will be volunteered to painstakingly go through the entire specification to match up unmarked tests against normative statements in the specification. I'm only half-joking. :P

Ping @clehner @peacekeeper @OR13 @shigeya -- need any tests you wrote to match this format. Auditing all tests (and I expect report generation) is blocked until this is done.

I believe the tests I added are conforming to this format, beginning with either "6.1 Production and Consumption" (#45) or "3.2.1 DID Parameters" (#34, updated by #44)

Was missing in it statements, while it's prefixed with parent level describe. I think it's still traceable without it level with a run with the --verbose option (npm run test -- --verbose), but maybe easier for everybody.

This has been cleaned up, we have good clean test output now.