Reference / @getenginex/sdk/testing / MockRealtimeOptions
MockRealtimeOptions
Options of createMockRealtime.
Methods
isPrivate()?
optionalisPrivate(topic):boolean
Tells whether a full topic is private, for rejectPrivate() with no argument. Default: the topic whose last segment is the user (sub) of the connection's token, like the gateway's private ones (balance:<sub>, notification:<sub>, predictions:orders:<sub>...), without depending on a list of prefixes. Pass your own predicate if the id of a public topic may coincide with the user's.
Parameters
topic
string
Full topic of the subscribe, e.g. 'balance:u-1'.
Returns
boolean