MCPcopy
hub / github.com/socketio/socket.io / isInvalidPayload

Function isInvalidPayload

packages/socket.io-parser/test/parser.js:161–164  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

159
160 it("throw an error upon parsing error", () => {
161 const isInvalidPayload = (str) =>
162 expect(() => new Decoder().add(str)).to.throwException(
163 /^invalid payload$/,
164 );
165
166 isInvalidPayload('442["some","data"');
167 isInvalidPayload('0/admin,"invalid"');

Callers 1

parser.jsFile · 0.85

Calls 2

throwExceptionMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected