NativeScript application with jest tests are not compatible (nx)

Đang mở
#68 1 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
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
mobile, testing-qa

Hướng nghiên cứu

Tái hiện vấn đề với create-nx-workspace, @nativescript/nx và app được tạo, sau đó chạy npx nx run :test:ios. So sánh thiết lập kiểm thử NativeScript mặc định với cấu hình Jest được mô tả trong issue và kiểm tra repository nativescript-jest được liên kết. Hoàn thành khi các bài kiểm thử của app NativeScript được tạo chạy bằng Jest và diễn giải đúng các module và import của Angular.

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

Mô tả

By following the steps you indicate:

npx create-nx-workspace@latest (monorepo with a web app or a typescript app, indifferently)
npm install --save-dev @nativescript/nx.
npx nx g @nativescript/nx:app

Once you have the app created, if you use the command npx nx run <app-name>:test:ios the default NativeScript app created by NativeScript does not use jest, and sends you to start the tests using mocha, jasmine or qunit.

When you change the configuration to use jest (like web app), if you launch the app it doesn't know how to interpret angular modules and imports.

The "moduleResolution" configuration is not able to interpret it correctly so it always fails.

The tests that you have in your repository for the nativesscript application also fail.

These are the errors it gives:
imagen

I leave here the repository where you can find this test project: https://github.com/harikasin/nativescript-jest

Ngôn ngữ chính
TypeScript
Star
68
Fork
15
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 NativeScript/nx

Tất cả issue của NativeScript/nx

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.