mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-07 03:52:08 +08:00
优化代码
This commit is contained in:
@ -1,13 +1,14 @@
|
||||
const assert = require('assert')
|
||||
const crypto = require('crypto')
|
||||
const { createRequest } = require("../util/util")
|
||||
const { createRequest } = require('../util/util')
|
||||
|
||||
describe('测试搜索是否正常', () => {
|
||||
it('获取到的数据的 name 应该和搜索关键词一致', done => {
|
||||
const keywords = "海阔天空"
|
||||
const keywords = '海阔天空'
|
||||
const type = 1
|
||||
const limit = 30
|
||||
const data = 's=' + keywords + '&limit=' + limit + '&type=' + type + '&offset=0'
|
||||
const data =
|
||||
's=' + keywords + '&limit=' + limit + '&type=' + type + '&offset=0'
|
||||
createRequest('/api/search/pc/', 'POST', data)
|
||||
.then(result => {
|
||||
console.log(JSON.parse(result).result.songs[0].mp3Url)
|
||||
@ -18,4 +19,4 @@ describe('测试搜索是否正常', () => {
|
||||
done(err)
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
Reference in New Issue
Block a user