Twenty-shared tests parses decorator (#15765)
## Introduction Since we've moved some class validator instances from twenty-server to twenty-shared tests are red because they do not know how to parse decorators declarations We've fixed this by explicitly installing `class-validator` in `twenty-shared` and configuring jest swc accordingly ## Twenty-server class validator patch I don't even know if that's something we need anymore Seems to be a patch either fixing or introducing credit card and phone number validation Would prefer discussing the need or not to either before merging this as it could introduce regression at runtime: - Centralize the patch to be consumed in both `twenty-server` and `twenty-shared` - Remove the patch We should also document every patch motivations we do as it's quite though to iterate over a such huge one
This commit is contained in:
@@ -18,14 +18,6 @@ export const getStartUnitOfDateTime = (
|
||||
const firstDayOfTheWeekAsDateFNSNumber =
|
||||
getFirstDayOfTheWeekAsANumberForDateFNS(firstDayOfTheWeek);
|
||||
|
||||
console.log({
|
||||
firstDayOfTheWeek,
|
||||
firstDayOfTheWeekAsDateFNSNumber,
|
||||
startOfWekk: startOfWeek(dateTime, {
|
||||
weekStartsOn: firstDayOfTheWeekAsDateFNSNumber,
|
||||
}),
|
||||
});
|
||||
|
||||
return startOfWeek(dateTime, {
|
||||
weekStartsOn: firstDayOfTheWeekAsDateFNSNumber,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user