extension-examples icon indicating copy to clipboard operation
extension-examples copied to clipboard

Add an example about testing

Open jtpio opened this issue 5 years ago • 2 comments

Something that comes back often is the question of testing. So there could be an example about this that would cover several points such as:

  • setting up jest
  • reusing helpers from @jupyterlab/testutils
  • spawning kernels and launching the tests with the run-test.py helper

There is already some documentation about this in:

https://jupyterlab.readthedocs.io/en/stable/developer/extension_dev.html#testing-your-extension

And we could draw some inspiration from the @jupyterlab/jupyterlab-git and @jupyterlab/debugger extensions.

jtpio avatar Dec 01 '19 21:12 jtpio

An example using galata would be really nice: https://github.com/jupyterlab/galata

jtpio avatar Apr 23 '21 19:04 jtpio

Hopefully this example should now be easier to make, since some testing tooling and infrastructure is now available in the cookiecutter: https://github.com/jupyterlab/extension-cookiecutter-ts/pull/207

jtpio avatar Oct 07 '22 14:10 jtpio