Tests are run against a live devnet using jest
.
yarn test
: Runs all of the testsyarn test -t 'query' --verbose
: Runs all tests that have "query" as part of their name.
The JS types for Nibiru are generated from the blockchain's .proto
files. The protocgen.sh
script copies these files and scaffolds code into the @nibiruchain/protojs
package. Run it with:
yarn clean
yarn proto-gen
yarn build
At the root level, simply use
yarn build
The nibijs
package is documented in JSDoc format with TSDoc. TSDoc is a proposed standardization of the doc comments used in TypeScript code. Microsoft developed it alongside an open source reference implementation of a parser that's compliant with the standard, which is published on npm as @microsoft/tsdoc.
TypeDoc is a documentation generator for TypeScript projects built on top of TSDoc. We use TypeDoc to generate HTML and CSS for the nibijs docs, and typedoc-plugin-markdown
to create the corresponding docs in markdown.
The corresponding scripts for TypeDoc can are defined in package.json
:
yarn docgen:md
yarn docgen
Note The
docgen:md
is run automatically as a part of thebuild
script. THis is to make sure that the latest documentation is available for access from the NibiruChain/docs-nibiru repo.
References: