Tests don't run in Angular 16 using Jasmine/Karma

Đang mở
#25,936 15 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
angular, typescript
Lĩnh vực
build-system, cli, testing

Hướng nghiên cứu

Tái hiện lỗi bằng ng test sử dụng các phiên bản Angular CLI, Node và TypeScript được liệt kê trong issue. Bắt đầu bằng việc kiểm tra @ngtools/webpack/src/ivy/index.js và cấu hình tsconfig của dự án; hoàn tất khi các bài kiểm thử Angular 16 chạy mà không gặp lỗi token không xác định hoặc thiếu biên dịch đã được báo cáo.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area: @ngtools/webpack freq1: low severity5: regression type: bug/fix
Command

test

Is this a regression?
  • Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was

15

Description

The project compiles well, and the tests worked in version 15 of Angular. After running ng test I am receiving the following error:

ng-virtual-main.js!=!data:text/javascript;base64 ...Unknown string like token - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): ...Unknown string like token s missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

Minimal Reproduction

After running ng test I am receiving the following error:

ng-virtual-main.js!=!data:text/javascript;base64 ...Unknown string like token - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): ...Unknown string like token s missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.

Exception or Error
`ng-virtual-main.js!=!data:text/javascript;base64 ...Unkown string like token - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):  ...Unkown string like token s missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.`
Your Environment
npm ls @ngtools/webpack

`└─┬ @angular-devkit/build-angular@16.2.4
  └── @ngtools/webpack@16.2.4`

ng version 

`Angular CLI: 16.2.4
Node: 18.15.0
Package Manager: npm 9.5.0
OS: linux x64

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

Package                              Version
--------------------------------------------------------------
@angular-devkit/architect            0.1602.4
@angular-devkit/build-angular        16.2.4
@angular-devkit/core                 16.2.4
@angular-devkit/schematics           16.2.4
@angular/cdk                         16.2.6
@angular/cli                         16.2.4
@angular/material                    16.2.6
@angular/material-date-fns-adapter   16.2.6
@schematics/angular                  16.2.4
rxjs                                 7.5.7
typescript                           4.9.3
zone.js                              0.13.3
`
Anything else relevant?

No response

Ngôn ngữ chính
TypeScript
Star
27k
Fork
11.8k
Merge trung bình
16 giờ 35 phút
Pull request đã merge (30 ngày)
176

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của angular/angular-cli

Tất cả issue của angular/angular-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.