Closed
Bug 1573408
Opened 5 years ago
Closed 5 years ago
Restore mock of console.error in Jests tests
Categories
(DevTools :: Application Panel, defect, P1)
DevTools
Application Panel
Tracking
(firefox70 fixed)
RESOLVED
FIXED
Firefox 70
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: ladybenko, Assigned: ladybenko)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/x-phabricator-request
|
Details |
From this review comment on the patch for 1565172:
[...] We aren't restoring the mock after the tests are done. And since we are mocking console.error, that means that later on if we have a test that is failing, we might not get proper error logging. [...]
This restoration can be done manually, but i'd suggest using
mockRestore
in conjuction withspyOn
, as explained here https://jestjs.io/docs/en/mock-function-api.html#mockfnmockrestore . We would need to ensure this restoration is done after all tests in this suite have been run.
Assignee | ||
Updated•5 years ago
|
Summary: Restore mock of console.error → Restore mock of console.error in Jests tests
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → balbeza
Status: NEW → ASSIGNED
Priority: P2 → P1
Assignee | ||
Comment 1•5 years ago
|
||
Pushed by balbeza@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9cf024260752
Restore mock in jest tests r=Ola,sole
Comment 3•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox70:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
You need to log in
before you can comment on or make changes to this bug.
Description
•