jest-preset-angular
jest-preset-angular copied to clipboard
[Bug]: Declaration of TestComponent with signal input breaks jest.mock
Version
14.1.0
Steps to reproduce
- clone https://github.com/MillerSvt/jest-preset-angular-bug-repro
- run npm i
- 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