Skip to content

installing @angular/localize broke jasmine/types #48434

@kondelik

Description

@kondelik

Which @angular/* package(s) are the source of the bug?

localize

Is this a regression?

Yes

Description

When I install @angular/localize in newly created angular project, jasmine types (describe, it, expect, afterAll etc) are not recognized inside *.spec.ts:

To reproduce:

ng new Angular15.net
cd Angular15.net
ng add @angular/localize
# code .

image
(these error messages are in czech - see below for english error messages)

Please provide a link to a minimal reproduction of the bug

ng new Angular15.net
cd Angular15.net
ng add @angular/localize
# code .

Please provide the exception or error you saw

describe():

Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.(2593)

it():

Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add 'jest' or 'mocha' to the types field in your tsconfig.(2593)

expect():

Cannot find name 'expect'.(2304)

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 15.0.3
Node: 18.12.1
Package Manager: yarn 1.22.19
OS: win32 x64

Angular: 15.0.3
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1500.3
@angular-devkit/build-angular   15.0.3
@angular-devkit/core            15.0.3
@angular-devkit/schematics      15.0.3
@schematics/angular             15.0.3
rxjs                            7.5.7
typescript                      4.8.4

Anything else?

yarn add --dev @types/jasmine@4.3.0: does not help.

yarn test: tests are executed successfully:
image

Metadata

Metadata

Assignees

Labels

area: i18nIssues related to localization and internationalization

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions