In this section you can provide some details about the Amplenote plugin that this repo will implement.
- Clone this repo.
git clone git@github.com:alloy-org/plugin-template.git
- Install node and npm with your package manager of choice.
- Run
npm install
to install the packages (jest, fetch (for Jest)). - If you are going to use any secret keys, put them in
.env.example
, then copy that to.env
and fill in whatever environment variables you need
Run NODE_OPTIONS=--experimental-vm-modules npm test
to run the tests.
If it complains about jsdom being absent, run npm install -D jest-environment-jsdom
and try again.
If you are using a JetBrains IDE (Webstorm, Rubymine, anything that speaks Javascript), you can get an excellent debugging environment to run your tests.
Read how to set up tests with this environment in JetBrains IDEs.
NODE_OPTIONS=--experimental-vm-modules npm run test -- --watch