Closed Bug 1605368 Opened 6 years ago Closed 6 years ago

Use is() instead of ok() when comparing values in browser_application_panel_manifest-display.js

Categories

(DevTools :: Application Panel, task, P3)

task

Tracking

(firefox74 fixed)

RESOLVED FIXED
Firefox 74
Tracking Status
firefox74 --- fixed

People

(Reporter: jdescottes, Assigned: jdescottes)

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/b243debf6235b050b42fd2eb615fdc729636ca6b/devtools/client/application/test/browser/browser_application_panel_manifest-display.js#116-119,137-141

Two spots are using ok to compare test values:

  ok(
    imgEl && imgEl.src === URL_ROOT + "resources/manifest/icon.svg",
    "An image is being displayed with the icon url as source"
  );
// ...
  ok(
    itemEl.querySelector(".js-manifest-item-content").textContent ===
      expectedValue,
    `Manifest member ${member} is being displayed with value ${expectedValue}`
  );

While this works fine, in case you get a failure, the logs will not include the expected & test value automatically. Using the is helper takes care of this.

Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/11720a001804 Use is() instead of ok() in some asserts of browser_application_panel_manifest-display.js r=ladybenko
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: