Page MenuHomePhabricator

[lib] Add validator to the message spec
ClosedPublic

Authored by michal on Apr 27 2023, 6:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 3:48 PM
Unknown Object (File)
Wed, Nov 20, 5:45 PM
Unknown Object (File)
Tue, Nov 12, 10:33 AM
Unknown Object (File)
Mon, Nov 4, 4:12 PM
Unknown Object (File)
Mon, Nov 4, 4:12 PM
Unknown Object (File)
Sat, Nov 2, 12:29 PM
Unknown Object (File)
Tue, Oct 29, 9:42 PM
Unknown Object (File)
Mon, Oct 28, 8:48 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
Lint Not Applicable
Unit
Tests Not Applicable

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.