迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:kutyel/babel-plugin-remove-test-ids开源软件地址:https://github.com/kutyel/babel-plugin-remove-test-ids开源编程语言:JavaScript 100.0%开源软件介绍:babel-plugin-remove-test-ids
Install$ npm install babel-plugin-remove-test-ids --save Usage.babelrc {
"plugins": [
"remove-test-ids"
]
} ... you can also configure it with your attributes! {
"plugins": [
[
"remove-test-ids",
{
"attributes": ["data-test", "data-custom-test-attr"]
}
]
]
} MotivationIn React Alicante 2017, Forbes Lindsay gave a talk about "End to End testing React applications" with cabbie and explained the pattern of adding He also mentioned that it would be "fairly easy to do a Babel plugin" to strip those attributes from the actual DOM, if you care enough. :) Also, other testing tools like Selenium uses a similar approach and could benefit from this plugin as well! LicenseMIT © Flavio Corpa. ![]() |
2022-08-15
2022-08-17
2023-10-27
2022-09-23
2022-08-13
请发表评论