Open Bug 1614400 Opened 4 years ago Updated 2 years ago

Discovery Stream loadSpocs could use better tests and break the main function into smaller pieces.

Categories

(Firefox :: New Tab Page, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: thecount, Unassigned)

Details

Looking at the unit tests for loadSpocs, it looks like it's not really testing all of it very well, mainly the chunks inside placementsForEach and cache usage, is barely tested. It looks like it's mostly testing to satisfy code coverage.

I suspect part of the problem is the loadSpocs function itself is simply doing too much.

If we broke that down into smaller functions, it would be easier to see where we need tests, and easier to make those tests.

Summary: Discovery Stream showSpocs could use better tests and break the main function into smaller pieces. → Discovery Stream loadSpocs could use better tests and break the main function into smaller pieces.
Priority: -- → P2
No longer blocks: pocket-newtab
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.