Modifications #241

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

View File

@@ -1,32 +1,33 @@
const chai = require("chai"); const chai = require("chai");
const { assert } = chai; const { assert } = chai;
process.env.ShowLoadTime = true;
const BdsCore = require("../index"); const BdsCore = require("../index");
describe("Small functions", () => { describe("Small functions", () => {
it("Detect Server is running", function (done) { it("Detect Server is running", function (done) {
this.timeout(10000); this.timeout(10000);
assert.equal(BdsCore.detect(), false); assert.equal(BdsCore.BdsCkeckKill.Detect(), false);
done(); done();
}); });
it("List Platforms Avaible", async function() { it("List Platforms Avaible", async function() {
this.timeout(10 * 1000); this.timeout(10 * 1000);
await BdsCore.CheckSystem(); await BdsCore.BdsSystemInfo.SystemInfo();
}); });
it("Update Platform to Java", function(done) { it("Update Platform to Java", function(done) {
BdsCore.platform_update("java"); BdsCore.BdsSettings.UpdatePlatform("java");
done(); done();
}); });
it("Update Platform to dragonfly", function(done) { it("Update Platform to dragonfly", function(done) {
BdsCore.platform_update("dragonfly"); BdsCore.BdsSettings.UpdatePlatform("dragonfly");
done(); done();
}); });
it("Register And Delete API Token", function (done) { it("Register And Delete API Token", function (done) {
const Token = BdsCore.token_register(); const Token = BdsCore.BdsManegerAPI.token_register();
BdsCore.delete_token(Token); BdsCore.BdsManegerAPI.delete_token(Token);
done(); done();
}); });
it("Get Server Config", function (done) { it("Get Server Config", function (done) {
BdsCore.get_server_config(); BdsCore.BdsServerSettings.get_config();
done(); done();
}); });
}); });

View File

@@ -107,7 +107,8 @@ function GetCpuCoreCount() {
} }
module.exports = CheckSystemAsync; module.exports = CheckSystemAsync;
module.exports.SystemInfo = CheckSystemAsync;
module.exports.arch = arch module.exports.arch = arch
module.exports.GetKernel = GetKernel; module.exports.GetKernel = GetKernel;
module.exports.CheckSystemAsync = CheckSystemAsync; module.exports.CheckSystemAsync = CheckSystemAsync;
module.exports.GetCpuCoreCount = GetCpuCoreCount; module.exports.GetCpuCoreCount = GetCpuCoreCount;