Back to Nx

Replace GetJestProjects With GetJestProjectsAsync

packages/jest/src/migrations/update-20-0-0/replace-getJestProjects-with-getJestProjectsAsync.md

22.7.1517 B
Original Source

Replace Usage of getJestProjects with getJestProjectsAsync

Replaces the usage of the deprecated getJestProjects function with the getJestProjectsAsync function.

Sample Code Changes

Before
ts
import { getJestProjects } from '@nx/jest';

export default {
  projects: getJestProjects(),
};
After
ts
import { getJestProjectsAsync } from '@nx/jest';

export default async () => ({
  projects: await getJestProjectsAsync(),
});