nx/packages/jest/src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync.md
Leosvel Pérez Espinosa c0aa245d9c
feat(testing): remove deprecated getJestProjects (#30844)
Remove the deprecated function `getJestProjects`.

BREAKING CHANGE: The previously deprecated `getJestProjects` function
was removed in favor of `getJestProjectsAsync`.
2025-04-25 09:12:13 -04:00

31 lines
606 B
Markdown

#### Replace Usage of `getJestProjects` with `getJestProjectsAsync`
Replaces the usage of the deprecated `getJestProjects` function with the `getJestProjectsAsync` function.
#### Sample Code Changes
{% tabs %}
{% tab label="Before" %}
```ts {% fileName="jest.config.ts" %}
import { getJestProjects } from '@nx/jest';
export default {
projects: getJestProjects(),
};
```
{% /tab %}
{% tab label="After" %}
```ts {% fileName="jest.config.ts" %}
import { getJestProjectsAsync } from '@nx/jest';
export default async () => ({
projects: await getJestProjectsAsync(),
});
```
{% /tab %}
{% /tabs %}