Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed react ts jest #16

Closed
wants to merge 1 commit into from
Closed

Conversation

jamesg1
Copy link

@jamesg1 jamesg1 commented Jul 30, 2021

Related to #12 and vitejs/vite#1955

I changed "<rootDir>/src/**/*.{spec,test}.{js,jsx,ts,tsx}", to "<rootDir>/src/**/*.{spec,test}.{ts,tsx}", and now the tests are running.

Screen Shot 2021-07-30 at 10 55 42 AM

module.exports = {
  preset: "vite-jest",

  setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
  testMatch: [
    "<rootDir>/src/**/__tests__/**/*.{js,jsx,ts,tsx}",
    "<rootDir>/src/**/*.{spec,test}.{ts,tsx}",
  ],
  testEnvironment: "jest-environment-jsdom",
  moduleNameMapper: {
    "\\.(css|sass|scss)$": "identity-obj-proxy",
  },
};

@msakrejda
Copy link

Is this still relevant? The test passes me on a fresh checkout.

@jamesg1
Copy link
Author

jamesg1 commented Jan 24, 2022

Yeah can be closed. I believe there is another vite jest library under development too.

@jamesg1 jamesg1 closed this Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants