mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-07-07 02:32:06 +08:00
fix: 单元测试问题修复
This commit is contained in:
@ -1,10 +1,12 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const serverMod = require('./server')
|
||||
|
||||
const tmpPath = require('os').tmpdir()
|
||||
/** @type {import("express").Express & serverMod.ExpressExtension} */
|
||||
let app
|
||||
|
||||
if (!fs.existsSync(path.resolve(tmpPath, 'anonymous_token'))) {
|
||||
fs.writeFileSync(path.resolve(tmpPath, 'anonymous_token'), '', 'utf-8')
|
||||
}
|
||||
const serverMod = require('./server')
|
||||
before(async () => {
|
||||
app = await serverMod.serveNcmApi({})
|
||||
|
||||
|
Reference in New Issue
Block a user