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

fix: 新增白名单文件夹、配置文件平移,组件的动态名称、wx:key、base64、px/rpx、mode、this.data.xxx转… #345

Merged

Conversation

caoyang818
Copy link

这个 PR 做了什么? (简要描述所做更改)
fix: 新增白名单文件夹、配置文件平移,组件的动态名称、wx:key、base64、px/rpx、mode、this.data.xxx转换问题单元测试用例

这个 PR 是什么类型? (至少选择一个)

  • 错误修复(Bugfix) issue: fix #
  • 新功能(Feature)
  • 代码重构(Refactor)
  • TypeScript 类型定义修改(Typings)
  • 文档修改(Docs)
  • 代码风格更新(Code style update)
  • 其他,请描述(Other, please describe):

这个 PR 涉及以下平台:

  • 所有小程序
  • 微信小程序
  • 支付宝小程序
  • 百度小程序
  • 字节跳动小程序
  • QQ 轻应用
  • 京东小程序
  • 快应用平台(QuickApp)
  • Web 平台(H5)
  • 移动端(React-Native)
  • 鸿蒙(harmony)

})


describe('postcss-unit-transform', () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个测试用例没有覆盖代码

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已优化该用例,移入[packages/taro-cli-convertor/tests/script.test.ts]文件

const path = require('path')

describe('parseAst', () => {
// this.data.xx = XXX转为setData问题

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

写问题场景,不要写问题

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

已将描述修改为问题场景

let contentInput = 'width: 100px;height: 200rpx;padding: {{padCount}}px;margin: {{marCount}}rpx;'
contentInput = convertStyleUnit(contentInput)
expect(contentInput).toBe('width: 5rem;height: 5rem;padding: {{padCount/20}}rem;margin: {{marCount/40}}rem;')
const styleParseReslut = parseStyle('style', contentInput)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下面的解析的判断是不是可以优化

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,已优化

@qican777 qican777 merged commit 78bf5c1 into handsomeliuyang:release-3.6.8-app Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants