Closed Bug 1552123 Opened 5 years ago Closed 5 years ago

debugger/devtools node test runners fail to detect jest snapshot failures

Categories

(DevTools :: General, task, P2)

task

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

On latest central, I have the following snapshot failure when running the debugger tests:

Summary of all failing tests
FAIL packages/devtools-reps/src/object-inspector/tests/component/window.js
  ● ObjectInspector - dimTopLevelWindow › renders window as expected when dimTopLevelWindow is true

    expect(value).toMatchSnapshot()

    Received value does not match stored snapshot "ObjectInspector - dimTopLevelWindow renders window as expected when dimTopLevelWindow is true 2".

    - Snapshot
    + Received

    @@ -57,11 +57,11 @@
          onClick={[Function]}
          onKeyDownCapture={null}
          role="treeitem"
        >
          <span
    -       className="tree-indent"
    +       className="tree-indent tree-last-indent"
          >
            ​
          </span>
          <div
            className="node object-node lessen"

      43 |     nodes = wrapper.find(".node");
      44 |     expect(nodes.at(0).hasClass("lessen")).toBeFalsy();
    > 45 |     expect(wrapper).toMatchSnapshot();
         |                     ^
      46 |   });
      47 | 
      48 |   it("renders collapsed top-level window when dimTopLevelWindow =false", () => {

      at Object.<anonymous> (object-inspector/tests/component/window.js:45:21)
      at step (object-inspector/tests/component/window.js:3:191)
      at object-inspector/tests/component/window.js:3:361

(and 3 others but removed them from here, they look the same). You can also find them on this recent try run: https://taskcluster-artifacts.net/dEwXsDpbSYm8ftVj2LLVSA/0/public/logs/live_backing.log

It should lead to Jest failing, but it doesn't. The test ends with jestPassed: true,

I suspect the devtools node test suite has the same issue.

ni? Jason: we probably need a better error detection logic for Jest. Any idea?

Flags: needinfo?(jlaster)

I believe that david recently fixed these source tree jest issues. With that said, I'm really not sure how the runner is failing. It gives and exit code 1 locally. I'm looking into it though.

Flags: needinfo?(jlaster)
Flags: needinfo?(dwalsh)
Blocks: node-dx
Type: defect → task

I'm really not sure how the runner is failing.

If you refer the log from try, it failed on flow, so it's not directly related. Sorry if it was confusing.
The point is that Jest is failing, but the runner is not failing.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Flags: needinfo?(dwalsh)
Pushed by jlaster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e62a90a57da1
debugger/devtools node test runners fail to detect jest snapshot failures. r=jdescottes
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: