mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2025-10-22 22:53:09 +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-
|
${{ runner.os }}-node-
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
name: Install dependencies
|
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
|
- 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
|
run: npm test
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint
|
||||||
|
@ -18,6 +18,7 @@ describe('测试登录是否正常', () => {
|
|||||||
if (!err && res.statusCode == 200) {
|
if (!err && res.statusCode == 200) {
|
||||||
body = JSON.parse(body)
|
body = JSON.parse(body)
|
||||||
assert(body.code === 200)
|
assert(body.code === 200)
|
||||||
|
console.log('昵称:' + body.profile.nickname)
|
||||||
done()
|
done()
|
||||||
} else {
|
} else {
|
||||||
done('登录错误')
|
done('登录错误')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user