NervJS / taro-ui

一款基于 Taro 框架开发的多端 UI 组件库
https://taro-ui.taro.zone
MIT License
4.52k stars 756 forks source link

taro-ui 下面的 test怎么运行 #1745

Open syyuan14 opened 8 months ago

syyuan14 commented 8 months ago

问题描述

在packages/taro-ui 目录下面执行npm run test 会报错:

Support for the experimental syntax 'jsx' isn't currently enabled (7:37):

   5 | describe('AtTextarea Snap', () => {
   6 |   it('render initial AtTextarea', () => {
>  7 |     const componet = renderToString(<AtTextarea />)
     |                                     ^
   8 |     expect(componet).toMatchSnapshot()
   9 |   })

想问一下正确的 test运行步骤是什么样的呢 复现步骤

// 这里可以贴代码

期望行为

报错信息

系统信息

补充信息

taro-ui-bot[bot] commented 8 months ago

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~