Improve integration tests performance #350
Labels
enhancement
Denotes a suggestion or request aimed at improving or adding new features to the project.
good first issue
Highlights beginner-friendly tasks, ideal for those looking to contribute for the first time.
Milestone
Currently, each test file (or group of tests) uses
beforeAll
andafterAll
hooks to create and delete a project, respectively. This approach is redundant and negatively impacts test performance.The objective is to refactor the test setup so that the project is created only once at the beginning of the tests and deleted after all tests finish (regardless of success or failure).
Checklist:
Remove
tests.setupFiles
vitest.config.mts
file.tests.setupFiles
property.Add
tests.globalSetup
vitest.config.mts
, add atests.globalSetup
property pointing to a configuration file.process.env.TEST_ENV === 'integration'
.package.json -> scripts -> test:integration
to set this flag.Create a Global Setup File
Use the following template for the configuration file:
Clean Up Test Files
beforeAll
andafterAll
hooks from test files where they are no longer needed.Notes:
Submit a pull request to the
release/v5.0.0
branch.The text was updated successfully, but these errors were encountered: