jest-preset-angular icon indicating copy to clipboard operation
jest-preset-angular copied to clipboard

[Bug]: Declaration of TestComponent with signal input breaks jest.mock

Open MillerSvt opened this issue 8 months ago • 5 comments

Version

14.1.0

Steps to reproduce

  1. clone https://github.com/MillerSvt/jest-preset-angular-bug-repro
  2. run npm i
  3. run nx test app

Expected behavior

Test pass, jest.mock works in test-with-input.spec.ts

Actual behavior

jest.mock not works in test-with-input.spec.ts. Test fails.

Additional context

Temporary workaround

Declare TestComponent in separate file.

Environment

Need to install the following packages:
[email protected]
Ok to proceed? (y) y

  System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.12.2/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
  npmPackages:
    jest: ^29.4.1 => 29.7.0

MillerSvt avatar Jun 18 '24 06:06 MillerSvt