Running jest tests rendering components created with createText() cause tests to fail with an exception
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- react-native, typescript
- Ambito
- mobile-dev, testing
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- TypeScript
- Stelle
- 3.4k
- Fork
- 154
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Shopify/restyle
-
Reanimated 4.4.x animated components conflict with Restyle themeForse già presa @KAMRONBEK l’ha presa 131 giorni fa. Apertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 15/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
-
Cannot make custom componentApertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Tutte le issue di Shopify/restyle
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
testing-library/jest-dom#749 ·
-
Duplicate "./pack-settings" export in packages/workflows/package.json makes `bun install` failAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
zed-industries/delta-claude#50 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
CDLUC3/dmptool-doc#660 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
stripe/stripe-terminal-react-native#1162 ·
I maintainer di solito rispondono entro 1 giorno