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:
Antoine Moreaux
2025-09-19 11:25:53 +02:00
committed by GitHub
parent 163890f6c8
commit 43e0cd5d05
351 changed files with 16091 additions and 6101 deletions
@@ -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;
};