Comments (5)
Found a solution after lots of searching keyz/identity-obj-proxy#9 (comment)
Should the postinstall enable the esmoduleinterop? or at least be documented on readme?
from jest-preset-spfx-react16.
Fixed... no need to do a postinstall. ts-jest uses it's own tsconfig.json defined within this package. Ref:
from jest-preset-spfx-react16.
Hey @andrewconnell
Thanks for the quick answer on this one.
Just updated to latest of this package, removed esmoduleinterop
from the project tsconfig.json
, ran the unit tests again and the class names are missing.
Did I miss something?
Looking at your commit I can see two differences:
- the classname is hardcoded (not relying on the styles import)
- your example unit tests are not querying against that class name (to validate the issue)
from jest-preset-spfx-react16.
Good catch... missed a commit of one of my changes. Fixed now...
The issue was that ts-jest wasn't configured to use the TypeScript config file within the preset... it was defaulting to the project's tsconfig.json.
ref 9c48e13
from jest-preset-spfx-react16.
Thanks!
I'm now getting a looot of errors (no implicit anys, libs missing for dom & co, decorators, modules not being resolved etc...)
I think it'd make sense to have that tsconfig extend the project root tsconfig (which in it's turn inherits the one provided by rush)
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
- Problem when using WebPartTitle component HOT 4
- Gracefully handle failures in postinstall step
- Add automated tests
- Add continuous deployment
- Unable to use with ES6 modules HOT 30
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.