Closed Bug 2024072 Opened 8 months ago Closed 3 months ago

Migrate lib/ and content-src/lib/ Enzyme unit tests

Categories

(Firefox :: New Tab Page, enhancement)

enhancement

Tracking

()

RESOLVED INVALID

People

(Reporter: maxx, Unassigned)

References

Details

Attachments

(2 obsolete files)

Remove the following Enzyme/Mocha/Karma unit test files:

content-src/lib/:

  • test/unit/content-src/lib/detect-user-session-start.test.js
  • test/unit/content-src/lib/init-store.test.js
  • test/unit/content-src/lib/perf-service.test.js
  • test/unit/content-src/lib/screenshot-utils.test.js
  • test/unit/content-src/lib/selectLayoutRender.test.js
  • test/unit/content-src/lib/utils.test.jsx

lib/:

  • test/unit/lib/AboutPreferences.test.js
  • test/unit/lib/ActivityStream.test.js
  • test/unit/lib/ActivityStreamMessageChannel.test.js
  • test/unit/lib/ActivityStreamPrefs.test.js
  • test/unit/lib/DiscoveryStreamFeed.test.js
  • test/unit/lib/DownloadsManager.test.js
  • test/unit/lib/FaviconFeed.test.js
  • test/unit/lib/InferredModel/FeatureModel.test.js
  • test/unit/lib/NewTabInit.test.js
  • test/unit/lib/PersistentCache.test.js
  • test/unit/lib/PrefsFeed.test.js
  • test/unit/lib/Screenshots.test.js
  • test/unit/lib/SectionsManager.test.js
  • test/unit/lib/SiteClassifier.test.js
  • test/unit/lib/SystemTickFeed.test.js
  • test/unit/lib/UTEventReporting.test.js

Blocks: 2018692

Converts 19 test files across lib/ and content-src/lib/ to use Jest assertions and mocks in place of Chai/Sinon/GlobalOverrider.
Extends jest-setup.mjs with additional Firefox globals needed by lib/ modules (Preferences, Logger, LinksCache, NewTabContentPing, PageThumbs, FileUtils, EventEmitter, getCharPref/setCharPref). DiscoveryStreamFeed and PrefsFeed will follow in a separate commit.

Attachment #9556139 - Attachment is obsolete: true
Attachment #9556136 - Attachment is obsolete: true
Type: task → enhancement
Summary: Remove lib/ and content-src/lib/ Enzyme unit tests → Migrate lib/ and content-src/lib/ Enzyme unit tests
Blocks: 2062310
No longer blocks: 2018692
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: