test(mini): 为核心工具函数添加 node:test 单元测试
Publish Mini Program Dev Version / publish (push) Successful in 2m56s
Publish Mini Program Dev Version / publish (push) Successful in 2m56s
- 新增 mini/utils/core/__tests__/index.test.js,70 个测试用例 - 覆盖:公农历互转、干支计算、生肖星座、纳音、节气、宜忌、冲煞、 地支关系、十神、天干合冲、五行分析、称骨算命、大运流年分析等 - 未导出函数通过 getDayInfo/getAlmanacInfo 间接验证 - 更新 package.json test 脚本,npm test 同时运行单元测试和 CI 绑定检查 - 使用 Node.js 内置 node:test,零额外依赖
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
||||
"description": "祈福小助手 - 万年历微信小程序",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test": "node ci/check-bindings.cjs",
|
||||
"test": "node --test utils/core/__tests__/index.test.js && node ci/check-bindings.cjs",
|
||||
"upload": "node ci/upload-ci.cjs",
|
||||
"preview": "node ci/preview-ci.cjs"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user