feat(billing): refacto billing (#14243)
… prices for metered billing --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@@ -64,11 +64,11 @@ describe('getDomainNameByEmail', () => {
|
||||
expect(getDomainNameByEmail('"user name"@example.com')).toBe('example.com');
|
||||
});
|
||||
|
||||
xit('should handle email with special characters in quoted local part', () => {
|
||||
it.skip('should handle email with special characters in quoted local part', () => {
|
||||
expect(getDomainNameByEmail('"user@#$%"@example.com')).toBe('example.com');
|
||||
});
|
||||
|
||||
xit('should handle email with quoted local part containing @', () => {
|
||||
it.skip('should handle email with quoted local part containing @', () => {
|
||||
expect(getDomainNameByEmail('"user@local"@example.com')).toBe(
|
||||
'example.com',
|
||||
);
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
export const findOrThrow = <T>(
|
||||
array: T[],
|
||||
predicate: (value: T) => boolean,
|
||||
): T => {
|
||||
const result = array.find(predicate);
|
||||
|
||||
if (!isDefined(result)) {
|
||||
throw new Error('Element not found');
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
Reference in New Issue
Block a user