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

hippy-react如何进行单元测试?是否支持无障碍访问? #269

Open
ldwonday opened this issue May 29, 2020 · 4 comments
Open

hippy-react如何进行单元测试?是否支持无障碍访问? #269

ldwonday opened this issue May 29, 2020 · 4 comments
Assignees

Comments

@ldwonday
Copy link

@ldwonday ldwonday commented May 29, 2020

另外建议发布ts的type文件到@types/tencent__hippy-react,这样子即便1.x的版本也可以用,目前我们用的就是1.x,在ts下无法使用快速的语法提示。React.memo()也用不了!

@xuqingkuang
Copy link
Collaborator

@xuqingkuang xuqingkuang commented Jun 1, 2020

内部的?!

  1. 1.x 的 @tencent/hippy-react 是有带 d.ts 文件的,它的 package.json 里有 types 字段指向了 d.ts。不过 1.x 的不支持使用 React Hooks。2.0 的已经用 typescript 重写,不过 rollup 生成的 d.ts 存在问题,这块儿还没什么想法,有时间可以一起研究一下。
  2. 无障碍访问使用 View 的 accessibilityLabel 参数。
@ldwonday
Copy link
Author

@ldwonday ldwonday commented Jun 1, 2020

@xuqingkuang 哈哈,是内部的!~现在用的1.x的版本,很不方便,不知道改为2.x会不会要改很多地方!如何在内部找到你?有没有升级指南之类的!

@xuqingkuang
Copy link
Collaborator

@xuqingkuang xuqingkuang commented Jun 8, 2020

@xuqingkuang 哈哈,是内部的!~现在用的1.x的版本,很不方便,不知道改为2.x会不会要改很多地方!如何在内部找到你?有没有升级指南之类的!

企业微信 xqkuang 找我就好,我拉你进单测群。

@xuqingkuang
Copy link
Collaborator

@xuqingkuang xuqingkuang commented Jun 19, 2020

已经在准备一个 PR - #289

打算做一个 jest-preset-hippy 来实现 hippy 底层的数据 mock 了,这样做单测时能方便一点。

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.