GithubHelp home page GithubHelp logo

jsdom mount about enzyme HOT 9 CLOSED

enzymejs avatar enzymejs commented on April 28, 2024
jsdom mount

from enzyme.

Comments (9)

ljharb avatar ljharb commented on April 28, 2024

On this line, wrapper is the button - perhaps you just want wrapper.simulate('click')?

from enzyme.

n7best avatar n7best commented on April 28, 2024

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.

lelandrichardson avatar lelandrichardson commented on April 28, 2024

@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.

n7best avatar n7best commented on April 28, 2024

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.

ljharb avatar ljharb commented on April 28, 2024

@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.

n7best avatar n7best commented on April 28, 2024

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.

lelandrichardson avatar lelandrichardson commented on April 28, 2024

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.

n7best avatar n7best commented on April 28, 2024

@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.

lelandrichardson avatar lelandrichardson commented on April 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.