chore: include react components in twenty-ui test config (#4709)

Split from https://github.com/twentyhq/twenty/pull/4518

Part of https://github.com/twentyhq/twenty/issues/4766

- Re-generates some of the twenty-ui test and storybook config with Nx
- Includes tsx files in twenty-ui tests and compiles them with swc

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
Thaïs
2024-04-04 12:30:49 +02:00
committed by GitHub
parent 932a8d68f5
commit eef1211463
12 changed files with 97 additions and 35 deletions

View File

@ -17,6 +17,7 @@
],
"outputs": ["{projectRoot}/src/index.ts", "{projectRoot}/src/*/index.ts"],
"options": {
"outputPath": "{projectRoot}/dist",
"command": "npx ts-node --esm {projectRoot}/scripts/generateBarrels.ts"
}
},
@ -37,9 +38,38 @@
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"outputs": ["{projectRoot}/coverage"],
"options": {
"jestConfig": "packages/twenty-ui/jest.config.ts"
"jestConfig": "{projectRoot}/jest.config.ts"
}
},
"storybook:dev": {
"executor": "@nx/storybook:storybook",
"options": {
"port": 6007,
"configDir": "{projectRoot}/.storybook"
},
"configurations": {
"ci": { "quiet": true }
}
},
"storybook:build": {
"executor": "@nx/storybook:build",
"outputs": ["{options.outputDir}"],
"options": {
"outputDir": "{projectRoot}/storybook-static",
"configDir": "{projectRoot}/.storybook"
},
"configurations": {
"ci": {
"quiet": true
}
}
},
"storybook:test": {
"executor": "nx:run-commands",
"options": {
"command": "test-storybook -c {projectRoot}/.storybook --url=http://localhost:6007"
}
}
},