Comments (4)
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.
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.
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.
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)
- Unexpected token export when running npm test HOT 7
- V1.3.1 causes different TSC rules to be applied than project settings HOT 2
- jest-preset.json testMatch Question HOT 7
- Unit testing typescript SPFx web part using jest
- NPM postinstall error @voitanos/[email protected] HOT 5
- Gracefully handle failures in postinstall step
- Add automated tests
- Add continuous deployment
- Unable to use with ES6 modules HOT 30
- undefined class names HOT 5
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 jest-preset-spfx-react16.