mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +08:00
將原本 "NeteaseCloudMusicApi/server" 掃描 modules 目錄的部分抽出 server.js, 改移到 main.js。這樣使用者就有辦法只載入 靜態的伺服器部分(不動態載入模組)。 這個 patch 的 breaking changes 不易發生。 可作為 patch version 發佈。
19 lines
483 B
JavaScript
19 lines
483 B
JavaScript
const assert = require('assert')
|
|
const main = require('./main')
|
|
|
|
describe('methods in server.js', () => {
|
|
it('has serveNcmApi', () => {
|
|
assert.strictEqual(typeof main.serveNcmApi, 'function')
|
|
})
|
|
|
|
it('has getModulesDefinitions', () => {
|
|
assert.strictEqual(typeof main.getModulesDefinitions, 'function')
|
|
})
|
|
})
|
|
|
|
describe('methods in module', () => {
|
|
it('has activate_init_profile', () => {
|
|
assert.strictEqual(typeof main.activate_init_profile, 'function')
|
|
})
|
|
})
|