Skip to content

Instantly share code, notes, and snippets.

@LissetteIbnz
Last active February 17, 2021 14:50
Show Gist options
  • Save LissetteIbnz/6f6e06c0bbcaf3e7fc3c7bd08c36bdfa to your computer and use it in GitHub Desktop.
Save LissetteIbnz/6f6e06c0bbcaf3e7fc3c7bd08c36bdfa to your computer and use it in GitHub Desktop.
describe('Login Mappers test', () => {
describe('mapLoginResponseToUserSession function', () => {
const invalidTestCases = [null, undefined, {}];
it.each(invalidTestCases)(
'given a %s value should return an empty user session',
actual => {
expect(mapLoginResponseToUserSession(actual as any)).toEqual({
userName: '',
token: '',
role: '',
});
}
);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment