Comments (6)
I noticed that preact-i18n
doesn't have display names for it's components either... so added synacor/preact-i18n#4
from preact-render-spy.
That text nodes fix is published in 1.0.0-rc.8
from preact-render-spy.
Hrm... Can you maybe setup a reduced test case repo for me to start debugging from here? I'll have some time to dig in deeper later today, but it would be nice to not have to set up this scenario myself 😄
I have some thoughts about why... does preact-i18n
use context/providers?
Also, was this with render spy's shallow
or deep
? I bet you it looks more like what you want on shallow
Can you try with import toString from 'preact-render-to-string/jsx'
and toString(jsx, { shallow: true })
(we use the shallow option from render-to-string on our toString output)
from preact-render-spy.
aha, I found the specific issue! basically i assumed any truthy output from components was vnodes, but it can also be a string - which was then made into an invalid vnode
from preact-render-spy.
Sorry didn't had time to create a test repo! Glad you already found the problem :), thanks for the fast fix!
from preact-render-spy.
Also, just as a suggestion - you might want to just start using shallow
as your default for testing (unless you're really depending on children components to do something) .
Let me know for sure that this patch fixed your string node issue tho :) (I'm pretty confident it did)
from preact-render-spy.
Related Issues (20)
- first() and last() functions for FindWrapper
- children and childAt functions for FindWrapper
- reduce() function for FindWrapper HOT 2
- exists function for FindWrapper
- .output() API Naming Bikeshed HOT 8
- Separate FindWrapper core and extended methods HOT 5
- Deprecate `childAt` HOT 3
- Is there any way to simulate keydown events? HOT 3
- Shallow or Deep can't compile the app when async module are loaded HOT 2
- index.d.ts is missing a number of type signatures HOT 1
- .text() behaviour for input elements HOT 1
- setting a defaultProps property on a component breaks the nodeName property of RenderContext HOT 1
- Are components valid selectors?
- defaultProps not working correctly with functional components HOT 1
- Testing with HOC and shallow HOT 2
- .find by data-attributes HOT 3
- Receiving function prop as undefined
- TypeError: this.contextRender is not a function when using shallow HOT 1
- Is project going to support preact 10? HOT 9
- Issue with `.attr()`: Argument not assignable to parameter of type 'never' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from preact-render-spy.