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, Nov 17, 5:55 PM
Unknown Object (File)
Fri, Nov 8, 9:56 AM
Unknown Object (File)
Fri, Nov 8, 9:56 AM
Unknown Object (File)
Fri, Nov 8, 9:56 AM
Unknown Object (File)
Fri, Nov 8, 9:56 AM
Unknown Object (File)
Tue, Nov 5, 2:24 AM
Unknown Object (File)
Tue, Nov 5, 2:24 AM
Unknown Object (File)
Tue, Nov 5, 2:24 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.