Closed Bug 1539530 Opened 3 years ago Closed 3 years ago

Run Jest tests with Task Cluster


(DevTools :: Netmonitor, enhancement, P3)



(firefox68 fixed)

Firefox 68
Tracking Status
firefox68 --- fixed


(Reporter: Honza, Assigned: ns19041997)



(1 file)

Network monitor code base would benefit from having some Jest/Enzyme tests that runs continuously on Try.

Similar support (but for mocha tests) was done for the Console panel in bug 1312823.


Assignee: nobody → ns19041997
Priority: -- → P3

Nicolas, why I don't see any jest tests in this try push:

I used the following try syntax:
try: -b do -p linux64 -u devtools-tests,mochitest-dt -t none --artifact


Flags: needinfo?(nchevobbe)

I think maybe it's because the glob for the when: files-changed: is erroneous (like the console one):
Could you try by changing it to:

             - 'devtools/client/aboutdebugging-new/src/components/**'
             - 'devtools/client/framework/components/**'
             - 'devtools/client/webconsole/**/*.js'
             - 'devtools/client/netmonitor/**/*.js'

Or maybe put specific folders you want to watch, like aboutdebugging-new is doing?

Flags: needinfo?(nchevobbe)

Hi @honza, @nchevobbe, @davidwalsh

I started the try run with try: -b do -p linux64 -u devtools-tests,mochitest-dt -t none --artifact but devtools node tests were not being run, so I added a new job on try itself. The added task is named: source-test-node-devtools-tests. This runs the jest tests as shown in the log: The jest test for the reducer passes once but is run again and fails on second run due to a missing && that I'll add and run again.

I ran again with try: -b do -p linux64 -u devtools-tests,source-test-node-devtools-tests -t none --artifact, but still I have to add the node tests using "Add new job".

I have fixed the missing && issue, and scheduled 2 try runs, one with ./mach try -b do -p linux64 -u devtools-tests,mochitest-dt -t none --artifact and other with ./mach try -b do -p linux64 -u devtools-tests,source-test-node-devtools-tests -t none --artifact. The devtools node tests still were not being run so I added a new job from "Add New Job(Fuzzy)" on treeherder with the job title as "source-test-node-devtools-tests" and the tests pass here: !
What I think the issue is that we are missing the exact node tests clause to add to the try command.

Thanks for the update!

The patch/setup is correct and I can also see green try:

In order to run on try we could define a new preset netmonitor-tests in this file:

Similar to what is there for debugger-tests:

The new preset would be run as follows:
./mach try --preset netmonitor-tests

In any case, this should be done in a followup bug


Pushed by
Setting up  Jest tests with Task Cluster r=Honza
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.