Giter Club home page Giter Club logo

Comments (3)

cexbrayat avatar cexbrayat commented on September 28, 2024

Hi @julisch94

Thanks for the repro. I guess this is a problem with JSX (I personally don't use it, and this definitely should work). We don't have a lot of tests with JSX components so maybe this doesn't work.

Would you like to try to open a PR and fix it? A good first step would be to add a unit test to reproduce the issue. Then the issue is probably in https://github.com/vuejs/test-utils/blob/main/src/vnodeTransformers/stubComponentsTransformer.ts.

That would be a great help and we would gladly review and merge it!

from test-utils.

julisch94 avatar julisch94 commented on September 28, 2024

I have tried to solve it by adding a failing test case. I was able to fix one of them by defining a name inside my component. With that, actually my original bug was solved for me. So no code changes needed.

However, it would be nice if test-utils would be able to determine the component name by itself and just stub it no matter what the name of the child component is.

I tried to achieve that in #2441 but couldn't manage to solve the failing test. Maybe you can help?

Anyway, for now I'm happy to just add a name to my JSX component and that will fix it for me. So this has no urgency. Thanks for the help anyways. ❤️

from test-utils.

cexbrayat avatar cexbrayat commented on September 28, 2024

As discussed in #2441 (comment) I think adding a name is probably the only way for now, except if the JSX plugin decides to more info to the component 👍

from test-utils.

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.