MCPcopy Create free account
hub / github.com/GetStream/stream-js / checkUserResponse

Function checkUserResponse

test/integration/cloud/profile.js:18–29  ·  view source on GitHub ↗
(userFn, data)

Source from the content-addressed store, hash-verified

16 });
17
18 const checkUserResponse = (userFn, data) => {
19 ctx.responseShouldHaveFields('id', 'created_at', 'updated_at', 'data');
20
21 ctx.responseShould('have id and data matching the request', () => {
22 ctx.response.id.should.equal(userFn().id);
23 ctx.response.data.should.eql(data);
24 });
25
26 ctx.test('the local user data should be updated', () => {
27 userFn().data.should.eql(data);
28 });
29 };
30
31 const checkProfileResponse = (userFn, data, following, followers) => {
32 ctx.responseShouldHaveFields('id', 'created_at', 'updated_at', 'data', 'following_count', 'followers_count');

Callers 1

profile.jsFile · 0.85

Calls 3

responseShouldMethod · 0.80
testMethod · 0.80

Tested by

no test coverage detected