Page MenuHomePhabricator

[lib] Introduce basic unit tests for `ThreadOpsUtils`
ClosedPublic

Authored by atul on Apr 4 2023, 12:32 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 16, 9:39 PM
Unknown Object (File)
Fri, Jun 14, 1:42 PM
Unknown Object (File)
Thu, Jun 13, 4:36 PM
Unknown Object (File)
Wed, Jun 12, 4:14 PM
Unknown Object (File)
Tue, Jun 4, 5:23 PM
Unknown Object (File)
Tue, Jun 4, 3:43 AM
Unknown Object (File)
Tue, May 28, 10:30 AM
Unknown Object (File)
Tue, May 28, 10:30 AM
Subscribers

Details

Summary

Depends on D7300


Mostly a sanity test that convertRawThreadInfoToClientDBThreadInfo and convertClientDBThreadInfoToRawThreadInfo are inverse functions with/without avatar field included.

Test Plan

yarn test and they succeed

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul published this revision for review.Apr 4 2023, 12:34 PM
atul added inline comments.
lib/utils/thread-ops-utils.test.js
12–402 ↗(On Diff #24636)

Sorry, I realize these are long. It's probably difficult to read this file unless your editor allows you to visually "collapse" objects.

I could alternatively store these as JSON in some sort of test_data directory and JSON.parse(...) them in here? Wanted to spend as little time on these tests as possible so didn't do that, but can do before landing if others feel that would be a good idea,

This revision is now accepted and ready to land.Apr 4 2023, 1:20 PM
This revision was landed with ongoing or failed builds.Apr 5 2023, 7:07 AM
This revision was automatically updated to reflect the committed changes.