Options
All
  • Public
  • Public/Protected
  • All
Menu

@aion-dk/js-client

Assembly Voting JS Client

Code coverage

Javascript API for building voter-facing election applications.

Installing

Install directly from Github into your Javascript project.

npm install @aion-dk/js-client

Documentation

https://aion-dk.github.io/js-client/

Optional docker setup

$ bin/docker-build
$ bin/docker-sh

Testing

To run tests:

yarn run test

To run the tests in watch mode:

yarn run tdd

To record the responses

In the js-client go to walkthrough.test.ts and disable mocks by changing const USE_MOCK = true; -> false.

Uncomment // return await recordResponses(async function() { in returns a receipt test. Remember the closing brackets at the end of the test.

The recorded responses should be saved the test/replies/otp_flow-folder.

The folder can be copy pasted to the ionic-app-repo by replacing the folder tests/e2e/fixtures/otp_flow

To generate HTML documentation for external usage:

yarn run docs

Sequence of client method calls, when everything works, and voter does not test encryption