debian-mirror-gitlab/spec/frontend/invite_members/utils/member_utils_spec.js
2022-08-13 15:12:31 +05:30

12 lines
409 B
JavaScript

import { memberName } from '~/invite_members/utils/member_utils';
describe('Member Name', () => {
it.each([
[{ username: '_username_', name: '_name_' }, '_username_'],
[{ username: '_username_' }, '_username_'],
[{ name: '_name_' }, '_name_'],
[{}, undefined],
])(`returns name from supplied member token: %j`, (member, result) => {
expect(memberName(member)).toBe(result);
});
});