Unit Tests Section

The Unit Tests section in the Ponicode interface is your way to directly interact with your test file. When you open the webview Ponicode looks for a file named FUNCTION_NAME.test.js in the same directory as the test file. If the file exists, this section will be populated with the test cases found in said file. If not, Ponicode creates the file for you as soon as you add your first test case.

When you add or remove a test case in this section, your test file is updated in real time and vice versa.

Adding test cases to the section

Adding new test cases to the Unit Tests section can be done in several ways. You can:

Removing test cases

To remove a test case, simply click on the "bin" icon at the right side of the test case row.

Running test cases

You might want to run your test cases to see wether they pass ("checked icon") or fail ("red cross icon"). There are two ways to do this:

  1. Run your test cases individually by using the "Play" button on the right hand side of the test case row.
  2. Use watch mode

Ready to write beautiful code?

Smart and simple docstring generation. Now available in your favorite code hosting platform.

Try it now