Managing the delegation of voting power between addresses and provides querying of an address' voting power.
Start by cloning the git repo locally.
To retrieve the project dependencies and before any further tasks will run correctly.
npm ci
To run the tests locally, in addition to the checked out code you'll also need an install of Postgres.
MacOS can easily use Homebrew
brew install postgres
Role for tests
psql postgres
CREATE ROLE unit_test_user
LOGIN
CREATEDB
PASSWORD 'unit-test-p@ssw0rd';
Start the Postgres service
brew services start postgres
Stop the Postgres service
brew services stop postgres
To enable Husky commit hooks to trigger the lint-staged behaviour of formatting and linting the staged files prior
before committing, prepare your repo with prepare
.
npm run prepare
npm run build
npm test
If you make changes that don't get picked up then add a clean into the process
npm run clean
npm run build
npm test