feat(new tool): phone parser and normalizer

This commit is contained in:
Corentin Thomasset 2023-05-01 16:43:45 +02:00 committed by Corentin THOMASSET
parent 3f6c8f0edd
commit ce3150c65d
10 changed files with 357 additions and 140 deletions

View file

@ -1,6 +1,6 @@
import _ from 'lodash';
import { describe, expect, it } from 'vitest';
import { isNotThrowing } from './boolean';
import { booleanToHumanReadable, isNotThrowing } from './boolean';
describe('boolean utils', () => {
describe('isNotThrowing', () => {
@ -13,4 +13,11 @@ describe('boolean utils', () => {
).to.eql(false);
});
});
describe('booleanToHumanReadable', () => {
it('should return "Yes" if the value is true and "No" otherwise', () => {
expect(booleanToHumanReadable(true)).to.eql('Yes');
expect(booleanToHumanReadable(false)).to.eql('No');
});
});
});