Giter Site home page Giter Site logo

Comments (5)

baywet avatar baywet commented on August 19, 2024

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.

andrewconnell avatar andrewconnell commented on August 19, 2024

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.

baywet avatar baywet commented on August 19, 2024

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.

andrewconnell avatar andrewconnell commented on August 19, 2024

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.

baywet avatar baywet commented on August 19, 2024

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)

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.