-
Notifications
You must be signed in to change notification settings - Fork 497
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
refactor: add packages/tdesign-vue-next for test #5021
Open
zhangpaopao0609
wants to merge
17
commits into
develop
Choose a base branch
from
feature/paopao/tdesign-vue-next-test
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+606,043
−202,868
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
问题:tsc 编译错误当前的 tsconfig.json 编译 tsc-es 等会出现如下问题 原因是:tsconfig.json 中
解决方案:临时新增一个用于编译
|
2684ac0
to
acd48b4
Compare
哦,看到了,这就试试 然后还有另一种方式可以解决:这是 {
root: '../../../',
test: {
coverage: {
reportsDirectory: 'packages/tdesign-vue-next/test/coverage',
}
}
} 更新:2025 年 2 月 16 日 12:44
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤔 这个 PR 的性质是?
🔗 相关 Issue
#5020
💡 需求背景和解决方案
如 issue 描述:完善 packages/tdesign-vue-next 测试
在这之前,需要考虑一个问题,test 应该怎么放置。
放置在 packages/tdesign-vue-next/test
按照之前的讨论,应是 packages/tdesign-vue-next/test 这样的存在,test 里面包含 vitest.config.js、test_setup.js 和 unit 和 snap 的配置。
这种方式的优点在于出口文件和脚本统一。
那么问题是:packages/tdesign-vue-next/test 是否需要作为一个子应用存在呢?
如果作为子应用存在,其:
如果不作为子应用存在,其:
单独走包,类似于 build
好处在于根 package.json 脚本清晰一些
2025 年 2 月 15 日 13:00 补充结论
和 @uyarn 讨论后结论如下:
和 build 不同的是,build 并不存在依赖上的差异,不同的出口的 build 只是在所使用的插件和配置(rollup.config.js)上的差异。但 test 不一样,不同的出口的 test 依赖上存在差异,例如
@vue/test-utils vue vue-router
等,因此 test 是需要放置出口文件里的。至于是否作为子应用,考虑依赖清晰,子应用会更合适
最外层已经有了脚本命令,可以说这里是不需要了
执行事项如下:
📝 更新日志