mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-22 14:43:10 +00:00
完善单元测试
This commit is contained in:
parent
a42decd00f
commit
b935a55356
7
.github/workflows/node.js.yml
vendored
7
.github/workflows/node.js.yml
vendored
@ -26,11 +26,10 @@ jobs:
|
||||
${{ runner.os }}-node-
|
||||
- run: npm ci
|
||||
name: Install dependencies
|
||||
- name: Set Test Env
|
||||
run: |
|
||||
export NCM_API_TEST_LOGIN_PHONE=${{ secrets.NCM_API_TEST_LOGIN_PHONE }}
|
||||
export NCM_API_TEST_LOGIN_PASSWORD=${{ secrets.NCM_API_TEST_LOGIN_PASSWORD }}
|
||||
- name: Test
|
||||
env:
|
||||
NCM_API_TEST_LOGIN_PHONE: ${{ secrets.NCM_API_TEST_LOGIN_PHONE }}
|
||||
NCM_API_TEST_LOGIN_PASSWORD: ${{ secrets.NCM_API_TEST_LOGIN_PASSWORD }}
|
||||
run: npm test
|
||||
lint:
|
||||
name: Lint
|
||||
|
@ -18,6 +18,7 @@ describe('测试登录是否正常', () => {
|
||||
if (!err && res.statusCode == 200) {
|
||||
body = JSON.parse(body)
|
||||
assert(body.code === 200)
|
||||
console.log('昵称:' + body.profile.nickname)
|
||||
done()
|
||||
} else {
|
||||
done('登录错误')
|
||||
|
Loading…
x
Reference in New Issue
Block a user