Setting up JetBrains IDE to run Amplenote plugin tests

link1. Pick run -> Edit Configurations



link2. Click "Edit template configurations"



link3. Choose "Jest" and then fill in these options



Everything else remains unchanged except for the yellow-outlined fields.


The --experimental-vm-modules won't always be necessary, but as of July 2023 node does not support importing esbuild modules in jest without it.


link4. You're done, run tests 🎉

After you click "Ok," you can now invoke any of the tests within plugin.tests.js:




You can set breakpoints anywhere by clicking in the left gutter. Setting breakpoints, inspecting state, and issuing new commands in the midst of existing functions is the key to iterating quickly as you build your plugin.