This is a quick guide to help you contribute to this JavaScript library.
Ensure you have pnpm installed and run the following command to install the library's dependencies.
pnpm install
You can then run the following commands to build, test and lint the client. Note, that you should set up your testing environment for running tests first.
# Build the library.
pnpm build
# Test the library (requires building first).
pnpm build && pnpm test
# Test a specific file or set of files.
pnpm build && pnpm test test/somefile.test.js
pnpm build && pnpm test test/somePattern*
# Lint and/or format the client.
pnpm lint
pnpm lint:fix
pnpm format
pnpm format:fix
The tests included in this repository can be run locally to test different endpoints. From the root folder, follow the steps below to setup the environment to run the tests:
- Make a copy of file
.env.example
and name it.env
. - Edit the
.env
file and include a line specifying your endpoint:whereDAS_API_ENDPOINT="<URL>"
<URL>
is the URL of your endpoint. - Ensure you have pnpm installed and run the following command to install the dependencies:
pnpm install
- Build and run the tests:
pnpm build && pnpm test