Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持 tsx ? #1

Closed
scarcoco opened this issue Aug 11, 2020 · 7 comments
Closed

支持 tsx ? #1

scarcoco opened this issue Aug 11, 2020 · 7 comments
Labels

Comments

@scarcoco
Copy link

支持 tsx ?

@ariesjia
Copy link
Contributor

ariesjia commented Aug 11, 2020 via email

@scarcoco
Copy link
Author

babel 已经支持 ts 了,这个可以支持 snapshot Test?

@mxyzzhong
Copy link
Contributor

目前用的就是preset-typescript,可以支持tsx文件的,可以查看示例。如果需要使用snapshot的话,可以查看renderToString方法,这是nerv-serve提供的渲染snapshot的方法。

@ariesjia
Copy link
Contributor

🎉 This issue has been resolved in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ariesjia
Copy link
Contributor

这里有一个snapshot test demo可以参考这来, src/__tests__目录有一些测试可以参考。

@scarcoco
Copy link
Author

scarcoco commented Aug 12, 2020

之前的 hook 实现的 counter 没法使用 snapshot,原因是 taro 不支持 hooks?

@ariesjia
Copy link
Contributor

ariesjia commented Aug 12, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants