Running jest tests rendering components created with createText() cause tests to fail with an exception
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ệ
- react-native, typescript
- Lĩnh vực
- mobile-dev, testing
Hướng nghiên cứu
Start with the Jest test that renders the Text component created by createText(). Trace the failure through composeRestyleFunctions.js, createVariant.js, and useRestyle.js using the provided stack trace. Done means the component renders in the Jest test without the funcsMap[propKey] exception.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
I'm writing a jest test case that renders a Text component created from the following line of code: export const Text = createText<IotTheme>();
I receive a resulting error:
TypeError: funcsMap[propKey] is not a function
at node_modules/@shopify/restyle/dist/composeRestyleFunctions.js:33:137
at Array.reduce (<anonymous>)
at Object.buildStyle (node_modules/@shopify/restyle/dist/composeRestyleFunctions.js:33:41)
at Object.func [as variant] (node_modules/@shopify/restyle/dist/createVariant.js:36:70)
at node_modules/@shopify/restyle/dist/composeRestyleFunctions.js:33:137
at Array.reduce (<anonymous>)
at Object.buildStyle (node_modules/@shopify/restyle/dist/composeRestyleFunctions.js:33:41)
at node_modules/@shopify/restyle/dist/hooks/useRestyle.js:48:45
at mountMemo (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:6877:19)
at Object.useMemo (node_modules/react-test-renderer/cjs/react-test-renderer.development.js:7213:16)
- Ngôn ngữ chính
- TypeScript
- Star
- 3.4k
- Fork
- 154
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Shopify/restyle
-
Reanimated 4.4.x animated components conflict with Restyle themeCó thể đã có người làm @KAMRONBEK đã nhận 131 ngày trước. Đang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 15/100
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
-
Cannot make custom componentĐang mởbug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Tất cả issue của Shopify/restyle
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
testing-library/jest-dom#749 ·
-
Duplicate "./pack-settings" export in packages/workflows/package.json makes `bun install` failĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
zed-industries/delta-claude#50 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CDLUC3/dmptool-doc#660 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
stripe/stripe-terminal-react-native#1162 ·
Maintainer thường phản hồi trong vòng 1 ngày