Back to Nx

Replace GetJestProjects With GetJestProjectsAsync

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

22.7.1514 B
Original Source

Replace Usage of getJestProjects with getJestProjectsAsync

Replaces the usage of the removed 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(),
});