1.0.1 • Published 2 years ago

@fyxgaming/run v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Run

tests codecov

Commands

  • npm run lint - Lint and automatically fix errors
  • npm run build - Build outputs
  • npm run test - Test library quickly
  • npm run test:node - Test the minified node build
  • npm run test:browser - Test the minified browser build (Chrome default)
  • npm run test:cover - Collect code coverage
  • npm run deploy - Redeploy extras to the blockchain
  • npm run bump - Create a new patch release
  • npm run test test/plugins/local-purse.js - Run just the purse tests

Configuring the tests

Various environment variables may be used to configure the tests:

NameDescriptionPossible ValuesDefault
NETWORKNetwork to test onmock, main, test, stnmock
BROWSERBrowser used for testingchrome, firefox, safari, MicrosoftEdgechrome
STRESSWhether to run the stress teststrue, falsefalse
PURSE_[network]Purse key used on a specific networkyour string privkeyundefined
APIBlockchain API when not using the mock networkrun, whatsonchainundefined
APIKEY_[api]API key used with a specific blockchain APIyour string api keyundefined
LOGGERWhether to log internal messages to the consoletrue, falsefalse

Examples

  • env BROWSER=safari npm run test:browser - Test the browser build on Safari
  • env STRESS=1 npm run test - Test library with stress tests
  • env NETWORK=test env PURSE=<funded_private_key> npm run test - Run all tests on testnet

.env file

For ease of use, you may also store these variables in a .env file where the tests are run. Here's a sample:

BROWSER=safari
PURSE_MAIN=<your priate key>
PURSE_TEST=<your private key>
APIKEY_MATTERCLOUD=<your api key>
1.0.1

2 years ago

1.0.0

2 years ago