The frontend in core has exactly two (2) unit tests:
war/src/test/js/pluginSetupWizard.spec.js
war/src/test/js/widgets/config/tabbar.spec.js
Both of these date from 2016. They use an old version of Jest from
https://jestjs.io and @jenkins-cd/js-test from
https://github.com/jenkinsci/js-test which has not been updated since
2016. Newer versions of Jest require significant changes in consumers
as described in JENKINS-68975. @jenkins-cd/js-test has many
problematic transitive dependencies as described in JENKINS-69070.
I could not find any usages of the @jenkins-cd/js-test framework in
plugins beside Blue Ocean, which is not being actively developed and
dates back to the same time period.
The status quo does not seem sustainable to me. While resolving
JENKINS-68975 and JENKINS-69070 are not out of the question, I wonder
whether we feel that the expected value to be gained is worth the
trouble. Recall that there are only two such tests in core, so I feel
the value being provided by them is minimal.
Perhaps it is time to declare the end of this particular journey and
delete these two tests, the use of Jest in core, and the use of
@jenkins-cd/js-test in core. If such a framework is desired, it might
be easier to start over rather than to modernize the existing
framework. The advantage would be a much simpler dependency tree and
easier maintenance. The disadvantage would be losing these two tests,
one for the setup wizard and one for some sort of tab bar.
I am inclined to vote in favor of ripping this out, unless someone
wants to take on JENKINS-68975 and JENKINS-69070. Does anyone have any
thoughts about this?