viclafouch / mui-tel-input

📌 A phone number input designed for MUI (Material ui) V6 built with libphonenumber-js
https://viclafouch.github.io/mui-tel-input
MIT License
158 stars 65 forks source link

Get error with Jest #114

Closed thangpqtechlead closed 8 months ago

thangpqtechlead commented 8 months ago

Hi, I use Jest to write unit test for a component use mui-tel-input and I get this error: SyntaxError: Cannot use import statement outside a module

  1 | import React, { ChangeEvent } from 'react'
> 2 | import { MuiTelInput } from 'mui-tel-input'

image

viclafouch commented 8 months ago

Duplicated with https://github.com/viclafouch/mui-tel-input/issues/97