Fix storybook tests (#5487)

Fixes #5486

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
gitstart-twenty
2024-05-22 02:24:08 +08:00
committed by GitHub
parent e47101e08b
commit 36b467d301
16 changed files with 709 additions and 101 deletions

View File

@ -0,0 +1,12 @@
import { AppPath } from '@/types/AppPath';
const getIndexAppPath = () => {
return AppPath.Index;
};
// This file is using the default export pattern to be compatible
// with the way it is imported in the tests.
// Otherwise we cannot mock it: https://github.com/jestjs/jest/issues/12145 as we are using ES native modules
// TBH: I am not a big fan of this pattern, alternatively we could set a global variable or a recoilState
// to store the value
export default { getIndexAppPath };