Skip to content

Conversation

@ymatsakova
Copy link
Contributor

In this PR:

  • Added the following dependencies to set up test environment:
    • babel/preset-env,
    • @babel/preset-typescript
    • @testing-library/jest-dom
    • @testing-library/react
    • babel-jest
    • identity-obj-proxy
    • jest
    • jest-environment-jsdom
  • Bumped @babel/core to v.7.23.3
  • Added jest and babel configs to integrate React Testing Library with Jest
  • Added a few examples of unit tests for Search component

The following docs were used:

@vercel
Copy link

vercel bot commented Nov 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
emoji-picker-react ❌ Failed (Inspect) Nov 17, 2023 1:59pm

@ymatsakova
Copy link
Contributor Author

Hello @ealush. Sorry for taking time to get back to you with a proposal for unit testing. Let me know what you think.

@@ -0,0 +1,6 @@
module.exports = {
presets: [
['@babel/preset-env', {targets: {node: 'current'}}],
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Jest doesn't support TypeScript. Babel just converts .tsx files into .js for Jest

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.

1 participant