Comments (5)
@Link631 If possible provide the solution you did so that other people encountering the issue might come here and find what you did
from identity-obj-proxy.
I solved my problem by implementing a custom proxy. The custom proxy requires the compiled js and iterates over the keys and sets key = key.
Furthermore it returns the Object under the requested key.
Now the keys of my scss are being set during the testrun.
If there is another way, how to make this standard proxy from this repository work, I would kindly ask for some advice. If it is really not working in this szenario, I could provide my solution.
Regards.
from identity-obj-proxy.
@Link631 +1 - would love to see your solution
from identity-obj-proxy.
Oh... it was long long time ago...
Basicly I was doing something like this
https://github.com/routablehq/jest-scss-transform
I wrote a custom transform which returned the scss class keys. For example if you have following scss variables:
$brandPrimary: #000000;
$brandSecondary: #ffffff;
:export {
brandPrimary: $brandPrimary;
brandSecondary: $brandSecondary;
}
Then the export of my transformation looked like this:
{
brandPrimary: "brandPrimary",
brandSecondary: "brandSecondary"
.....
}
After that i found my classes and values within my snapshots.
Off course, you do not check if the content of brandPrimary is set correctly within the scss, but you do check, if your html components do have the correct css classes set....
from identity-obj-proxy.
Thanks!
from identity-obj-proxy.
Related Issues (11)
- Seems like the postinstall is wrong HOT 1
- Support Object.prototype.* calls (such as hasOwnProperty).
- Cannot install through NPM HOT 1
- Assumes process implies process.versions.node
- Webpack loader HOT 5
- 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.