Jest encountered an unexpected token
This usually means that you are trying to import a file that Jest cannot parse, e.g. it's not plain JavaScript.
SyntaxError: Unexpected token export
1 | import React from 'react'
> 2 | import { Button, Layout, Icon } from '@ui-kitten/components'
| ^
我已经将它添加到我的 Jest 配置中并且没有看到任何变化,我的应用程序默认情况下应该使用 babel,因为它是由安装的 expo 制作的。
"jest": {
"preset": "jest-expo",
"transformIgnorePatterns": [
"/node_modules/(?!@ui-kitten/components)"
]
},