Skip to content

Commit

Permalink
Add timeout troubleshooting instructions to README.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrizagidulin committed Jul 2, 2019
1 parent ae61255 commit dd7d1b5
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,25 @@ ensure conformance with the specification.
3. Modify `config.json` for your run.
4. `npm test`

### Troubleshooting the Test Suite

#### Test Timeouts

If your tests are timing out (for example, it takes a long time to generate
needed keys), you can use the `--timeout` parameter in mocha, and pass in a
higher timeout (in milliseconds). For example, to increase the timeout for
each test to 10 seconds, you would:

```bash
npm test -- --timeout 10000
```

or when generating the report:

```bash
mocha --recursive --timeout 10000 test/vc-data-model-1.0/ -R json > implementations/report.json
```

#### JWT Test Configuration

The following are the command line parameters that JWT generators have to expect (in addition to the filename/path):
Expand Down Expand Up @@ -69,7 +88,7 @@ JWT configuration.
1. `npm install`
2. `cp config.json.example config.json`
3. Modify `config.json` for your run.
4. `mocha --recursive test/vc-data-model-1.0/ -R json > implementations/report.json`
4. `mocha --recursive --timeout 10000 test/vc-data-model-1.0/ -R json > implementations/report.json`
5. `mv implementations/report.json implementations/{YOUR_IMPLEMENTATION}-report.json`
6. `git add implementations/{YOUR_IMPLEMENTATION}-report.json`
7. `node implementations/generate.js`
Expand Down

0 comments on commit dd7d1b5

Please sign in to comment.