You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 18, 2024. It is now read-only.
'Color sv-primary-900 is not a valid color variable value. Please check the documentation for more information.',
150
150
);
151
151
});
152
+
153
+
test('should throw an error if room id is invalid',async()=>{
154
+
awaitexpect(
155
+
sdk(UNIT_TEST_API_KEY,{
156
+
...SIMPLE_INITIALIZATION_MOCK,
157
+
roomId: '<invalid-room-id>',
158
+
}),
159
+
).rejects.toThrow(
160
+
'[SuperViz] Room id is invalid, it should be between 2 and 64 characters and only accept letters, numbers and special characters: -_&@+=,(){}[]/«».:|\'"',
161
+
);
162
+
163
+
awaitexpect(
164
+
sdk(UNIT_TEST_API_KEY,{
165
+
...SIMPLE_INITIALIZATION_MOCK,
166
+
roomId: '1',
167
+
}),
168
+
).rejects.toThrow(
169
+
'[SuperViz] Room id is invalid, it should be between 2 and 64 characters and only accept letters, numbers and special characters: -_&@+=,(){}[]/«».:|\'"',
170
+
);
171
+
});
172
+
173
+
test('should throw an error if participant id is invalid',async()=>{
'[SuperViz] Participant id is invalid, it should be between 2 and 64 characters and only accept letters, numbers and special characters: -_&@+=,(){}[]/«».:|\'"',
'[SuperViz] Participant id is invalid, it should be between 2 and 64 characters and only accept letters, numbers and special characters: -_&@+=,(){}[]/«».:|\'"',
thrownewError('Participant name and id is required');
55
+
thrownewError('[SuperViz] Participant name and id is required');
35
56
}
36
57
37
58
if(!roomId){
38
-
thrownewError('Room id is required');
59
+
thrownewError('[SuperViz] Room id is required');
60
+
}
61
+
62
+
if(!validateId(roomId)){
63
+
thrownewError(
64
+
'[SuperViz] Room id is invalid, it should be between 2 and 64 characters and only accept letters, numbers and special characters: -_&@+=,(){}[]/«».:|\'"',
65
+
);
66
+
}
67
+
68
+
if(!validateId(participant.id)){
69
+
thrownewError(
70
+
'[SuperViz] Participant id is invalid, it should be between 2 and 64 characters and only accept letters, numbers and special characters: -_&@+=,(){}[]/«».:|\'"',
0 commit comments