diff --git a/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/__stories__/perf/RelationToOneFieldDisplay.perf.stories.tsx b/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/__stories__/perf/RelationToOneFieldDisplay.perf.stories.tsx index 49a076d80a47..989de5e7439f 100644 --- a/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/__stories__/perf/RelationToOneFieldDisplay.perf.stories.tsx +++ b/packages/twenty-front/src/modules/object-record/record-field/meta-types/display/components/__stories__/perf/RelationToOneFieldDisplay.perf.stories.tsx @@ -30,7 +30,7 @@ export const Default: Story = {}; export const Performance = getProfilingStory({ componentName: 'RelationFieldDisplay', - averageThresholdInMs: 0.2, + averageThresholdInMs: 0.22, numberOfRuns: 20, numberOfTestsPerRun: 100, }); diff --git a/packages/twenty-server/src/constants/assets-path.ts b/packages/twenty-server/src/constants/assets-path.ts index bf8908f2ced7..04766287433a 100644 --- a/packages/twenty-server/src/constants/assets-path.ts +++ b/packages/twenty-server/src/constants/assets-path.ts @@ -1,7 +1,8 @@ import path from 'path'; -console.log('__dirname', __dirname); -console.log('__dirname.endsWith', __dirname.endsWith('dist')); -export const ASSET_PATH = __dirname.endsWith('dist') - ? path.resolve(__dirname, `../../assets`) - : path.resolve(__dirname, `../../dist/assets`); +// If the code is built through the testing module, assets are not output to the dist/assets directory. +const IS_BUILT_THROUGH_TESTING_MODULE = !__dirname.includes('/dist/'); + +export const ASSET_PATH = IS_BUILT_THROUGH_TESTING_MODULE + ? path.resolve(__dirname, `../`) + : path.resolve(__dirname, `../../assets`);