Giter Site home page Giter Site logo

Comments (4)

andrewconnell avatar andrewconnell commented on July 19, 2024

Thanks... I'll make sure I include this in the future fix. For the short term, you can use a similar workaround mentioned in #1. But the preset should be able to avoid these issues.

from jest-preset-spfx-react16.

andrewconnell avatar andrewconnell commented on July 19, 2024

Update - I understand why this is happening, but I can't figure out how to fix it for a bigger set of circumstances.

It's easy to fix for just the one library you're using, but this will quickly turn into a +1 issue when someone uses another library, so I'm looking for a more dynamic solution... this is affecting all three of my presets...

Still working...

from jest-preset-spfx-react16.

andrewconnell avatar andrewconnell commented on July 19, 2024

Haven't forgotten about this, but in the short term, you could look to just mock that object up like I mention here: #1 (comment)

from jest-preset-spfx-react16.

andrewconnell avatar andrewconnell commented on July 19, 2024

I'm going to close this issue... I'm not entirely sure how to handle this. The challenge is that SPFx is loading that module on demand on the page (see the config.json folder)... so you somehow have to tell Jest where to find that module. Not sure how this would be done... sorry :(

from jest-preset-spfx-react16.

Related Issues (11)

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.