Skip to content

Latest commit

 

History

History
 
 

did-core-test-server

Jest Test Server

See The DID Core Test Suite for motivation.

This module exposes a set of jest suites that operate on custom json configurations as an async function getReportResults.

Usage

You may need to install node.js. You may also need to install docker.

git clone git@github.com:w3c/did-test-suite.git
npm i
cd ./packages/did-core-test-server

Important note: since this test suite depends on a local, non-published package jest-did-matcher, please run npm i at the top-level of this repository to correctly configure the relationship of packages.

The suites can be tests manually, using:

npm run generate-report

Or via http,

npm run start

Or run only the test:

npm run test

Testing with CURL

curl -s -X POST http://localhost:8080/test-suite-manager/generate-report \
-H "Content-Type: application/json" \
-d @./suites/did-spec/default.json \
| jq '.suitesReportJson[0]'

Embedding

The test suite functionality can be embedded in any HTTP server,

See example.

npm run test
npm run start
npm run docker:build
npm run docker:publish
npm run docker:run