Updated a profile test.

pull/136/head
Mikunj 6 years ago
parent cd3d17f977
commit b4248afd98

@ -92,30 +92,12 @@ describe('Profile', () => {
}); });
it('trims the display name', async () => { it('trims the display name', async () => {
const values = [ await storage.setProfileName(' in middle ');
{ const profile = storage.getLocalProfile();
current: ' prefix', const name = {
expected: 'prefix', displayName: 'in middle',
}, };
{ assert.deepEqual(name, profile.name);
current: 'suffix ',
expected: 'suffix',
},
{
current: 'in middle',
expected: 'in middle',
},
];
for(let i = 0; i < values.length; i += 1) {
const { current, expected } = values[i];
await storage.setProfileName(current);
const profile = storage.getLocalProfile();
const name = {
displayName: expected,
};
assert.deepEqual(name, profile.name);
}
}); });
it('unsets the name property if it is empty', async () => { it('unsets the name property if it is empty', async () => {

Loading…
Cancel
Save