Closed Bug 1554873 Opened 6 months ago Closed 4 months ago

Simplify devtools/client/inspector/fonts/fonts.js and remove eslint-disable complexity

Categories

(DevTools :: Inspector: Fonts, task, P3)

task

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: pbro, Assigned: arunmohandm)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This file contains a special eslint comment to temporarily disable the complexity eslint rule since it contains one or more functions that exceed the maximum complexity threshold. The code should be simplified, and the comment removed. Link to the code in question: https://searchfox.org/mozilla-central/search?q=eslint-disable+complexity&case=false&regexp=false&path=devtools%2Fclient%2Finspector%2Ffonts%2Ffonts.js

Component: General → Inspector: Fonts
Priority: -- → P3

Hey Patrick, I am having issues running the tests while I was refactoring the convertUnits function.

I got the following output when I ran ./mach test devtools/client/inspector/fonts/test/browser_fontinspector_editor-font-size-conversion.js.

UNKNOWN TEST: devtools/client/inspector/fonts/test/browser_fontinspector_editor-font-size-conversion.js
I was unable to find tests from the given argument(s).

You should specify a test directory, filename, test suite name, or
abbreviation. If no arguments are given, there must be local file
changes and corresponding IMPACTED_TESTS annotations in moz.build
files relevant to those files.

It's possible my little brain doesn't know about the type of test you are
trying to execute. If you suspect this, please request support by filing
a bug at
https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&component=General.

Do you see what I am missing?

Flags: needinfo?(pbrosset)

This is very odd. I checked on my side, and this is the correct file path and file name for this test.
So mach test should be able to find it.
Check for the obvious things first: did you remove or move that file by accident? Is the file still listed correctly in devtools/client/inspector/fonts/test/browser.ini? Can you try running mach mochitest instead?
Let me know if you still have issues. I'm in the process of re-building now, but I can try later locally if you want.

Flags: needinfo?(pbrosset)
Pushed by mozilla@noorenberghe.ca:
https://hg.mozilla.org/integration/autoland/rev/68f32cc623ed
Refactor convertUnits function to remove disabled complexity eslint rule. r=pbro
Status: NEW → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
Assignee: nobody → arunmohandm
You need to log in before you can comment on or make changes to this bug.