Modifications #241
@@ -1,32 +1,33 @@
|
||||
const chai = require("chai");
|
||||
const { assert } = chai;
|
||||
process.env.ShowLoadTime = true;
|
||||
const BdsCore = require("../index");
|
||||
|
||||
describe("Small functions", () => {
|
||||
it("Detect Server is running", function (done) {
|
||||
this.timeout(10000);
|
||||
assert.equal(BdsCore.detect(), false);
|
||||
assert.equal(BdsCore.BdsCkeckKill.Detect(), false);
|
||||
done();
|
||||
});
|
||||
it("List Platforms Avaible", async function() {
|
||||
this.timeout(10 * 1000);
|
||||
await BdsCore.CheckSystem();
|
||||
await BdsCore.BdsSystemInfo.SystemInfo();
|
||||
});
|
||||
it("Update Platform to Java", function(done) {
|
||||
BdsCore.platform_update("java");
|
||||
BdsCore.BdsSettings.UpdatePlatform("java");
|
||||
done();
|
||||
});
|
||||
it("Update Platform to dragonfly", function(done) {
|
||||
BdsCore.platform_update("dragonfly");
|
||||
BdsCore.BdsSettings.UpdatePlatform("dragonfly");
|
||||
done();
|
||||
});
|
||||
it("Register And Delete API Token", function (done) {
|
||||
const Token = BdsCore.token_register();
|
||||
BdsCore.delete_token(Token);
|
||||
const Token = BdsCore.BdsManegerAPI.token_register();
|
||||
BdsCore.BdsManegerAPI.delete_token(Token);
|
||||
done();
|
||||
});
|
||||
it("Get Server Config", function (done) {
|
||||
BdsCore.get_server_config();
|
||||
BdsCore.BdsServerSettings.get_config();
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
@@ -107,7 +107,8 @@ function GetCpuCoreCount() {
|
||||
}
|
||||
|
||||
module.exports = CheckSystemAsync;
|
||||
module.exports.SystemInfo = CheckSystemAsync;
|
||||
module.exports.arch = arch
|
||||
module.exports.GetKernel = GetKernel;
|
||||
module.exports.CheckSystemAsync = CheckSystemAsync;
|
||||
module.exports.GetCpuCoreCount = GetCpuCoreCount;
|
||||
module.exports.GetCpuCoreCount = GetCpuCoreCount;
|
||||
|
Reference in New Issue
Block a user