Giter Site home page Giter Site logo

Comments (5)

etiennejcharles avatar etiennejcharles commented on May 24, 2024 1

@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.

Link631 avatar Link631 commented on May 24, 2024

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.

andrewfritz86 avatar andrewfritz86 commented on May 24, 2024

@Link631 +1 - would love to see your solution

from identity-obj-proxy.

Link631 avatar Link631 commented on May 24, 2024

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.

andrewfritz86 avatar andrewfritz86 commented on May 24, 2024

Thanks!

from identity-obj-proxy.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.