Hey, is there some setup needed to get React Testi...
# help
d
Hey, is there some setup needed to get React Testing Library working on a sst react app?
I've done a lot of the basic setup i've seen online like installing the testing packages and stuff but I'm getting issues with unexpected tokens
t
there shouldn't be anything specific to SST with your react app
d
Ok, thanks!
d
Here’s mine
Copy code
// frontends jest.config.js

const config = {
  verbose: true,
  extensions: [".js", ".jsx", ".d.ts", ".ts", ".tsx"],
  moduleDirectories: ["node_modules", "src"],
};

module.exports = config;
Project root (similar to how the guide is set up)
Copy code
// package.json

  "jest": {
    "testPathIgnorePatterns": [
      "frontend",
      "website"
    ]
  },
d
Turns out the root of my issue was because I was trying to test svg elements which aren't really supported in jest dom right now, I didn't have to do a lot of jest configuration actually in the end