---
title: "Discussion on \"Jest encountered an unexpected token?\" | Hashnode"
description: "Discussion on \"Jest encountered an unexpected token?\". When I tried to use Jest to test my react component, an error occurred. Then I googled and looked for answer in stackoverflow. Took me hours of searching and finally I solved it.\nBelow is how I solved it. \n\nInstall \"@babel/plugin-transform-modules-co..."
url: "https://hashnode.com/posts/jest-encountered-an-unexpected-token/633859640a5f3da6039561f6"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Jest encountered an unexpected token?](https://septrabbit.hashnode.dev/jest-encountered-an-unexpected-token?utm_source=hashnode&utm_medium=feed)

When I tried to use Jest to test my react component, an error occurred. Then I googled and looked for answer in stackoverflow. Took me hours of searching and finally I solved it. Below is how I solved it. Install "@babel/plugin-transform-modules-co...

Oct 1, 2022 · 1 min read · septrabbit.hashnode.dev  
Read the article

-   [#jest](https://hashnode.com/tag/jest)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)

## Written by

[septRabbit](https://hashnode.com/@SeptRabbit)

@SeptRabbit

  
[View profile](https://hashnode.com/@SeptRabbit)

frontend developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
