Comments (9)
On this line, wrapper is the button - perhaps you just want wrapper.simulate('click')
?
from enzyme.
Yea, everything works fine local. Trying to get t work with Travis. I want to make sure it works before adding more test.
from enzyme.
@n7best is there any way you can figure out what that stacktrace is pointing to? undefined is not a function
... it would be nice to know what it is thinking is undefined.
i see you're using webpack to bundle it. When you run it locally, is it also running it bundled with webpack?
from enzyme.
Yea. Everything is same except for Travis I add
'''
if (process.env.TRAVIS) {
configs.browsers = ['Chrome_travis_ci'];
}
'''
To karma config to make chrome work. And all those error are from the one using mount. So I figure it's some where with Travis config where I manually insert nvm use 4 command where something still undefined
from enzyme.
@n7best you don't want a manual nvm use
command anywhere for travis tho - https://github.com/n7best/react-weui/blob/master/.travis.yml#L12 is unnecessary due to https://github.com/n7best/react-weui/blob/master/.travis.yml#L4. (also, https://github.com/n7best/react-weui/blob/master/.travis.yml#L13 is unnecessary since travis always prints that out)
from enzyme.
Ha I was just hoping that might be the problem since it doesn't work without those. So, yea those didn't help any thing. You can see (this build)[https://travis-ci.org/n7best/react-weui/builds/95716852] are without those and have same problem before I added those.
from enzyme.
It would help to know what line it is throwing on and what it is trying to invoke that is undefined. I suspect it is something that webpack is doing but I'm not sure what that would be
from enzyme.
@lelandrichardson I am running out of idea how to debug this thing since it's only happening with travis. I add debug info and sourcemap to this build where you can see which function is trigger the problem.
from enzyme.
@n7best one thing i can see is that part of the stack trace is ReactPerf.js
. Are you running the performance utils with react? I'm not sure if we've ever tested that. It could be causing some problems.
It seems like component.getPublicInstance()
is what is failing, thus getPublicInstance
does not exist. I'm not sure why that would happen :/
from enzyme.
Related Issues (20)
- enzyme-adapter-react-18 HOT 2
- Component is not re-rendered with updated states HOT 5
- Cheerio 1.0.0-rc.11 no longer support deep imports HOT 3
- enzyme crash since Cheerio 1.0.0-rc.11 release HOT 5
- CSS selectors match component props rather than rendered DOM HOT 6
- Cannot read property 'child' of undefined on React 16 + enzyme-adapter-react-16 HOT 1
- Cannot read property 'child' of undefined enzyme-adapter-react-16 and react 17.0.2 HOT 3
- "TypeError: Cannot read properties of undefined (reading 'current')" in mount API HOT 7
- Method βpropsβ is only meant to be run on a single node. 0 found instead. HOT 1
- How to test the form which is rendered based on props in class component in react.js ? HOT 3
- How to test the state values which are setting the state from local storage inside componentDidMount in enzyme using reactjs ? HOT 5
- Function `mount` does not mock proper data HOT 5
- [email protected] does not include latest changes as per master HOT 5
- Document `getElement(s)` for full DOM rendering HOT 3
- TypeError: window.require is not a function HOT 5
- Does Enzyme support React 18.0.2 ? HOT 1
- Is this library 'dead'? HOT 5
- Explain how the synchronization works HOT 1
- Mount and simulate are failing after changing to Node 16 HOT 10
- enzyme-adapter-react-18 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 enzyme.