- install
taskfile
brew install go-task/tap/go-task
- install
dotenv
globallynpm i -g dotenv
- configure
.env
- set NCC_BASE_SERVER, NCC_API_TOKEN, etc
- FYI env vars need to have prefix
NCC_
to work w vite server
task prepare-algonautjs
- installs algonautjs deps + builds lib + links pkg locally
task prepare-tests
- installs test dir deps + links to local instance of
@thencc/algonautjs
- installs test dir deps + links to local instance of
task tests
- runs task called "tests" which runs all tasks defined in yaml
- FYI, there are many logs... but no errors in the console is a win
- list all tasks:
task --list
- run 1 specific test:
task TASK_NAME
algonautjs
should work in all js/ts contexts. but to be sure, we automate the various types of initializations such as:
- browser
- esm
- relative
- skypack
- vue (ts)
- react (ts)
- TODO
- js cdn
- TODO?
- esm
- node
- javascript
package.json
> type >commonjs
package.json
> type >module
- typescript
package.json
> type >commonjs
package.json
> type >module
- javascript
Unit tests for algonaut are in algonaut.test.ts
. Run them with:
npm run test
Unit tests require ALGONAUT_TEST_MNEMONIC
to be set in the environment (.env is fine). This account must have a little bit of Algo in it to run the tests.
- don't mock code you don't own! APIs change all the time! :)