Skip to content

tests: Port unit tests to jasmine

Florian Müllner requested to merge fmuellner/gnome-shell:jasmine into main

The jsUnit module included with gjs is very basic, and has been considered deprecated for many years.

Jasmine is a popular testing framework for javascript, with the jasmine-gjs project providing support for gjs.

gjs itself uses jasmine for its unit tests (albeit with a minimal embedded jasmine runner instead of jasmine-gjs).

That is, there are good reason to switch to jasmine for our own unit tests:

  • maintained
  • more structured and expressive tests
  • same framework as gjs

There was an old attempt many years ago (pre-meson, pre-ESM, pre-half-our-unit-tests), pick that up to really make it happen this time.

Merge request reports