mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 14:41:23 +08:00
test: use env variable variables in login.test.js
This commit is contained in:
+4
-3
@@ -3,12 +3,13 @@ const request = require('request')
|
||||
const host = global.host || 'http://localhost:3000'
|
||||
|
||||
console.log('注意: 测试登录需在 test/login.test.js 中填写账号密码!!!');
|
||||
|
||||
const phone = ''
|
||||
const password = ''
|
||||
describe('测试登录是否正常', () => {
|
||||
it('手机登录 code 应该等于200', done => {
|
||||
const qs = {
|
||||
phone: phone,
|
||||
password: password
|
||||
phone: process.env.NCM_API_TEST_LOGIN_PHONE || phone || '',
|
||||
password: process.env.NCM_API_TEST_LOGIN_PASSWORD || password || ''
|
||||
}
|
||||
|
||||
request.get({url: `${host}/login/cellphone`, qs: qs}, (err, res, body) => {
|
||||
|
||||
Reference in New Issue
Block a user