Comments (5)
Hey, that's really cool! You guys are improving :) For sure this will fit most of my use cases. Anyway, I think there are still parts of Webpack that simply shouldn't be handled by Jest or any other tool. I mean, I can never really guarantee things will get done the same way by the both of them, Jest and Webpack.
Thanks for all the reply!
from identity-obj-proxy.
Hey, thanks for making this! Just curious, what are your use cases for this as a webpack loader?
from identity-obj-proxy.
When using Jest, you always have to fix a bunch of stuff Webpack takes care of; aliases, loaders, etc. It's very easy to use identity-obj-proxy directly as a mock for some kind of files such as .css, but you always get stuck with something else Webpack is doing which is hard to replicate on Jest. Therefore, sometimes it's easier to have a specific webpack file just for running tests, something that extends the default webpack configuration for you app. In this case, I'll use this loader to address .css files while testing.
Did it make sense?
from identity-obj-proxy.
Thanks. We just replaced Jest's scriptPreprocessor
config with transform
(jestjs/jest#1917), which is a mapping from extensions to transformer scripts. There's an example usage at jestjs/jest#2035. It might fit your needs better -- let me know what you think!
from identity-obj-proxy.
Thanks, let's keep this issue open for visibility.
from identity-obj-proxy.
Related Issues (11)
- Seems like the postinstall is wrong HOT 1
- Support Object.prototype.* calls (such as hasOwnProperty).
- using identity-obj-proxy for scss: all scss variables are undefined during testrun HOT 5
- Cannot install through NPM HOT 1
- Assumes process implies process.versions.node
- I can not install package HOT 1
- Use it with babel-plugin-react-css-modules HOT 1
- Error when there is no "es2015" in project babelrc file HOT 1
- Support named exports HOT 10
- undefined returned when using typescript with jest HOT 12
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 identity-obj-proxy.