Modifications #241

Merged
Sirherobrine23 merged 7 commits from Modifications into main 2021-11-17 20:02:15 +00:00
28 changed files with 731 additions and 918 deletions
Showing only changes of commit a0de5743f6 - Show all commits

View File

@@ -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();
});
});

View File

@@ -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;