mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
remove login test
This commit is contained in:
parent
56166c3157
commit
ae38be14ec
@ -1,35 +0,0 @@
|
||||
const assert = require('assert')
|
||||
const axios = require('axios')
|
||||
const host = global.host || 'http://localhost:3000'
|
||||
|
||||
console.log('注意: 测试登录需在 test/login.test.js 中填写账号密码!!!')
|
||||
const country_code = '1'
|
||||
const phone = '3156678705'
|
||||
const password = '1q2w3e4R'
|
||||
describe('测试登录是否正常', () => {
|
||||
it('手机登录 code 应该等于200', (done) => {
|
||||
const qs = {
|
||||
countrycode:
|
||||
process.env.NCM_API_TEST_LOGIN_COUNTRY_CODE || country_code || '',
|
||||
phone: process.env.NCM_API_TEST_LOGIN_PHONE || phone || '',
|
||||
password: process.env.NCM_API_TEST_LOGIN_PASSWORD || password || '',
|
||||
}
|
||||
|
||||
axios
|
||||
.get(`${host}/login/cellphone`, {
|
||||
params: qs,
|
||||
})
|
||||
.then(({ status, data }) => {
|
||||
if (status == 200) {
|
||||
console.log('昵称:' + data.profile.nickname)
|
||||
assert(data.code === 200)
|
||||
done()
|
||||
} else {
|
||||
done('登录错误')
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
done(err)
|
||||
})
|
||||
})
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user