Comments (2)
Hi @TehZarathustra, thank you for the issue and sorry for the delay!
The problem here is with identity-obj-proxy
, because it makes a proxy on styles
from .css
, and every value returns it's key, event the symbol, that reshadow
uses for some caching and internal needs.
I'd suggest to declare this kind of proxy
:
/**
* Proxy that works with reshadow, which uses symbols in styles
*
* @see https://github.com/keyz/identity-obj-proxy/blob/06716fbb8f4fb1cab0b66d7d9b474bed628a4766/src/index.js
*/
module.exports = new Proxy(
{},
{
get(target, key) {
if (typeof key === 'symbol') {
return target[key];
}
if (key === '__esModule') {
return false;
}
return key;
},
},
);
And in your jest.config.js:
"moduleNameMapper": {
".*\\.(sass|svg|png|jpg)$": "identity-obj-proxy",
"\\.css$": "<rootDir>/your-own-identity-obj-proxy",
},
Hope it helps.
from reshadow.
It does. Thanks a lot!
from reshadow.
Related Issues (20)
- TypeError: Cannot convert a Symbol value to a string when I run jest test some components HOT 2
- Hi. I make screenshot test for ReactComponent with @reshadow, but html element don't have style, but in browser everything ok. HOT 6
- Unable to customize css tagged template with string expressions HOT 1
- Selectors starting with colon can be handled incorrectly
- :focus-within doesn't work without :global
- [runtime] Support dynamic variables fallback
- [webpack] support 'module.css' postfix
- Hi guys. Is this project being developed and supported? I really like your idea. HOT 2
- Error with Vue 3 and @vue/babel-plugin-jsx HOT 2
- @reshadow/core `create` function `use` variable name mistype
- reshadow/postcss: up settings HOT 1
- Release error
- support dot in attribute value
- Analysis: 100% of dependency updates in this repository can be merged. HOT 1
- "as" property conflict
- styled function signature for typescript-styled-plugin compatibility
- Typescript typings for reshadow/macro HOT 1
- [svelte] preprocesser overwrites `this` attribute in an `<svelte:component />`
- [svelte] preprocesser adds unnecessary classes
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 reshadow.