Open aljones15 opened 2 weeks ago
please note that the current use of assert.rejects and assert.doesNotReject causes issues when a test fails do to an internal reason such as test data is missing or an implementation is missing an endpoint needed for a test. We should be at a minimum asserting on an HTTP status code 400 for negative tests. Checking for a status code at least avoids cases where a promise throws for a reason not related to the test at hand.
Related: https://github.com/w3c/vc-data-model-2.0-test-suite/issues/4
Existing assertions can be re-used to assert on status codes:
https://github.com/w3c-ccg/data-integrity-test-suite-assertion/blob/52bd29227a99a45d79bf437437d0ea379e4a0e46/assertions.js#L25-L56
https://github.com/w3c-ccg/data-integrity-test-suite-assertion/blob/52bd29227a99a45d79bf437437d0ea379e4a0e46/assertions.js#L244-L280
If possible re-use these common issuance and failure assertions.