The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/freeswitch/tests/parseUserStatus.test.ts

14 lines
421 B

import { parseUserStatus } from '../src/utils/parseUserStatus';
test.each([
['', 'UNKNOWN'],
[undefined, 'UNKNOWN'],
['error/user_not_registered', 'UNREGISTERED'],
['ERROR/user_not_registered', 'UNKNOWN'],
['sofia/user_data', 'REGISTERED'],
['sofia/', 'REGISTERED'],
['SOFIA/', 'UNKNOWN'],
['luana/', 'UNKNOWN'],
])('parse user status: %p', (input, output) => {
expect(parseUserStatus(input)).toBe(output);
});