Page MenuHomePhabricator

[lib] Add validator to the message spec
ClosedPublic

Authored by michal on Apr 27 2023, 6:28 AM.
Tags
None
Referenced Files
F1698161: D7655.diff
Fri, May 3, 11:57 PM
Unknown Object (File)
Sun, Apr 28, 5:24 AM
Unknown Object (File)
Mon, Apr 15, 12:09 AM
Unknown Object (File)
Fri, Apr 12, 6:34 PM
Unknown Object (File)
Wed, Apr 10, 4:34 AM
Unknown Object (File)
Fri, Apr 5, 4:59 AM
Unknown Object (File)
Fri, Apr 5, 4:59 AM
Unknown Object (File)
Fri, Apr 5, 4:59 AM
Subscribers

Details

Summary

Mentioned in D7567. Adds validators to the message spec and uses them in tests.

Test Plan

Run yarn jest

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
lib/types/validation.test.js
308–314 ↗(On Diff #26058)

Why do we need this condition?

This revision is now accepted and ready to land.May 4 2023, 3:47 AM
lib/types/validation.test.js
308–314 ↗(On Diff #26058)

IMAGES and MULTIMEDIA message types have the same multimediaMessageSpec message spec, so they have the same validator (which is a union of images validator and multimedia validator). So they accept each other.