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

Function beforeEachBrowser

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

Source from the content-addressed store, hash-verified

69}
70
71function beforeEachBrowser() {
72 this.client = connect(config.API_KEY, null, config.APP_ID, {
73 group: 'browserTestCycle',
74 location: 'qa',
75 protocol: 'https',
76 });
77
78 this.browserClient = connect(config.API_KEY, jwt(undefined, undefined, { userId: '123' }), config.APP_ID, {
79 group: 'browserTestCycle',
80 location: 'qa',
81 });
82
83 if (this.localRun) {
84 this.client.baseUrl = 'http://localhost:8000/api/';
85 this.client.fayeUrl = 'http://localhost:9999/faye/';
86 this.browserClient.baseUrl = 'http://localhost:8000/api/';
87 this.browserClient.fayeUrl = 'http://localhost:9999/faye/';
88 }
89
90 this.user1 = createFeedWithToken(this.client, 'user', '11');
91 this.user2 = createFeedWithToken(this.client, 'user', '22');
92 this.user3 = createFeedWithToken(this.client, 'user', '33');
93 this.user4 = createFeedWithToken(this.client, 'user', '44');
94 this.aggregated2 = createFeedWithToken(this.client, 'aggregated', '22');
95 this.aggregated3 = createFeedWithToken(this.client, 'aggregated', '33');
96 this.flat3 = createFeedWithToken(this.client, 'flat', '33');
97 this.secret3 = createFeedWithToken(this.client, 'secret', '33');
98 this.notification3 = createFeedWithToken(this.client, 'notification', '33');
99 this.user1ReadOnly = createFeedWithToken(this.client, 'user', '11', true);
100}
101
102module.exports = {
103 jwt,

Callers

nothing calls this directly

Calls 3

connectFunction · 0.85
jwtFunction · 0.85
createFeedWithTokenFunction · 0.85

Tested by

no test coverage detected