mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 22:51:23 +08:00
rewrite unit tests
This commit is contained in:
+16
@@ -0,0 +1,16 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
let app
|
||||
before(() => {
|
||||
app = require('./app.js')
|
||||
global.host = 'http://localhost:' + app.server.address().port
|
||||
})
|
||||
after((done) => {
|
||||
app.server.close(done)
|
||||
})
|
||||
|
||||
fs.readdirSync(path.resolve(__dirname, 'test'))
|
||||
.forEach(file => {
|
||||
require('./test/' + file)
|
||||
})
|
||||
Reference in New Issue
Block a user