Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

NEARFoundation/near-kyc-onfido

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEAR KYC Onfido NEAR License: GPL v3

A KYC flow integrating Onfido's API used by NEAR Foundation for legal purpose

Technology stack

Guides

Configuration

cp .env.development.local.example .env
# edit variables on .env

Installation

yarn install

Development

yarn dev

Deployment

yarn install
yarn build
yarn start

Tests

Unit

# run all unit tests
yarn test:unit

# run with coverage
yarn test:unit:coverage

# run in verbose mode
yarn test:unit:verbose

Once the tests are done, you can find the coverage report in tests/unit/reports.

End to end

If BUILD_AND_SERVE_WEBSITE_BEFORE_RUNNING_TEST=true is set in .env the website will be built and served every time you run the test command. It is recommended with CI/CD tools.

If you want instead to run the test locally many times for development purpose you may want to set BUILD_AND_SERVE_WEBSITE_BEFORE_RUNNING_TEST=false and run yarn dev or yarn build && yarn start in a separate terminal before running any test. It will run the tests a lot faster by skipping the build step.

# install testing dependencies (once only)
npx playwright install --with-deps

# headless test
yarn test:e2e

# headed test
yarn test:e2e:headed

# test with debug mode
yarn test:e2e:debug

# serve test reports
yarn test:e2e:report

Once the tests are done you can find screenshots of the results page in /tests/e2e/screenshots and the test report in /tests/e2e/reports.

Authors

License

GPLv3