Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nx 20.2.0-beta jest-preset-angular not using the latest function setup #29165

Closed
1 of 4 tasks
sheikalthaf opened this issue Dec 3, 2024 · 0 comments · Fixed by #29169
Closed
1 of 4 tasks

nx 20.2.0-beta jest-preset-angular not using the latest function setup #29165

sheikalthaf opened this issue Dec 3, 2024 · 0 comments · Fixed by #29169
Assignees
Labels
scope: angular Issues related to Angular support in Nx type: bug

Comments

@sheikalthaf
Copy link

Current Behavior

20.2.0-beta.5 not migrating to the latest function based setup

// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment
globalThis.ngJest = {
  testEnvironmentOptions: {
    errorOnUnknownElements: true,
    errorOnUnknownProperties: true,
  },
};
import 'jest-preset-angular/setup-jest';

Expected Behavior

This is the function based setup from jest-preset-angular.

import { setupZoneTestEnv } from 'jest-preset-angular/setup-env/zone';

setupZoneTestEnv({
  errorOnUnknownElements: true,
  errorOnUnknownProperties: true,
});

GitHub Repo

No response

Steps to Reproduce

  1. pnpm create-nx-workspace@next
  2. create an angular application
  3. check the test-setup.ts file

Nx Report

Node           : 20.18.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.12.3

nx                 : 20.2.0-beta.5
@nx/js             : 20.2.0-beta.5
@nx/jest           : 20.2.0-beta.5
@nx/eslint         : 20.2.0-beta.5
@nx/workspace      : 20.2.0-beta.5
@nx/angular        : 20.2.0-beta.5
@nx/devkit         : 20.2.0-beta.5
@nx/eslint-plugin  : 20.2.0-beta.5
@nx/web            : 20.2.0-beta.5
@nx/webpack        : 20.2.0-beta.5
typescript         : 5.6.3
---------------------------------------
Community plugins:
angular-eslint : 19.0.0

Failure Logs

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@leosvelperez leosvelperez added the scope: angular Issues related to Angular support in Nx label Dec 3, 2024
@leosvelperez leosvelperez self-assigned this Dec 3, 2024
FrozenPandaz pushed a commit that referenced this issue Dec 3, 2024
…gular` (#29169)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #29165
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: angular Issues related to Angular support in Nx type: bug
Projects
None yet
2 participants