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

Function beforeEachNode

test/integration/utils/hooks.js:50–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

48}
49
50function beforeEachNode() {
51 this.client = connect(config.API_KEY, config.API_SECRET, config.APP_ID, {
52 group: 'testCycle',
53 location: 'qa',
54 protocol: 'https',
55 });
56 this.user1 = this.client.feed('user', randUserId('11'));
57 this.user2 = this.client.feed('user', randUserId('22'));
58 this.user3 = this.client.feed('user', randUserId('33'));
59 this.user4 = this.client.feed('user', randUserId('44'));
60 this.aggregated2 = this.client.feed('aggregated', randUserId('22'));
61 this.aggregated3 = this.client.feed('aggregated', randUserId('33'));
62 this.flat3 = this.client.feed('flat', randUserId('33'));
63 this.secret3 = this.client.feed('secret', randUserId('33'));
64 this.notification3 = this.client.feed('notification', randUserId('33'));
65 const user1ReadOnlyId = randUserId('11');
66 const user2ReadOnlyId = randUserId('22');
67 this.user1ReadOnly = this.client.feed('user', user1ReadOnlyId, this.client.getReadOnlyToken('user', user1ReadOnlyId));
68 this.user2ReadOnly = this.client.feed('user', user2ReadOnlyId, this.client.getReadOnlyToken('user', user2ReadOnlyId));
69}
70
71function beforeEachBrowser() {
72 this.client = connect(config.API_KEY, null, config.APP_ID, {

Callers

nothing calls this directly

Calls 4

connectFunction · 0.85
randUserIdFunction · 0.85
feedMethod · 0.80
getReadOnlyTokenMethod · 0.80

Tested by

no test coverage detected