serverless / serverless-tencent

⚡️ 🐧 Serverless Tencent CLI 及中文讨论社区
https://cn.serverless.com
63 stars 26 forks source link

Add unit tests for serverless-tencent CLI #80

Closed zongUMR closed 2 years ago

zongUMR commented 2 years ago

What has been implemented?

Closes https://app.asana.com/0/1200011502754281/1201370907695778/f

Todos:

github-actions[bot] commented 2 years ago

:loop: Code coverage

Filename Statements Branches Functions Lines
tests/testUtils.js 100% 50% 100% 100%
src/libs/utils/basic.js 95.52% 82.8% 100% 95.76%
src/libs/utils/utils.js 96.44% 83.1% 100% 96.31%
src/libs/utils/index.js 100% 100% 100% 100%
src/libs/telemtry/generatePayload.js 91.01% 77.5% 100% 90.8%
src/libs/config.js 100% 95.71% 100% 100%
src/libs/cli.js 87.71% 64.17% 79.17% 90.06%
src/commands/registry.js 88.12% 67.8% 100% 88.12%
src/libs/serverlessFile.js 96.77% 94.44% 100% 96.77%
src/commands/credentials.js 94.03% 90.24% 50% 94.03%
src/commands/run.js 96.67% 84.91% 100% 96.64%
src/libs/notifications/generate-payload.js 100% 100% 100% 100%
src/libs/notifications/print-notification.js 100% 100% 100% 100%
src/commands/invoke/index.js 92.59% 93.18% 100% 92.59%
src/commands/runAll.js 91.46% 85% 100% 91.25%
src/commands/info.js 96.97% 79.17% 100% 96.97%
src/commands/dev.js 66.48% 51.89% 63.64% 66.48%
src/libs/telemtry/index.js 82.76% 75% 100% 88.68%
src/libs/telemtry/areDisabled.js 100% 100% 100% 100%
src/libs/telemtry/cache-path.js 85.71% 50% 100% 100%
src/commands/init.js 84.4% 77.78% 100% 84.4%
src/commands/logs.js 86.46% 76% 100% 86.32%
src/commands/help.js 93.48% 92.86% 100% 97.73%
src/commands/version.js 100% 100% 100% 100%