MoeFurina 398f410109 fix: update music search keyword and test case ID
- Changed the default search keyword in the API documentation from "这么可爱真是抱歉" to "妖精小姐的魔法邀约".
- Updated the test case for fetching song URL to use the correct song ID (from 1969519579 to 2756058128).
2025-11-01 12:16:29 +08:00

27 lines
588 B
JavaScript

const assert = require('assert')
const { default: axios } = require('axios')
const host = global.host || 'http://localhost:3000'
describe('测试获取歌曲是否正常', () => {
it('歌曲的 url 不应该为空', (done) => {
const qs = {
id: 2756058128,
br: 999000,
realIP: global.cnIp,
}
axios
.get(`${host}/song/url`, {
params: qs,
})
.then(({ status, data }) => {
if (status == 200) {
assert(!!data.data[0].url)
}
done()
})
.catch((err) => {
done(err)
})
})
})