mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 07:24:52 +09:00
Add and fix tests
This commit is contained in:
8 files changed
+60
-15
No files matched your search
@@ -378,5 +378,32 @@ describe("lib/data/ModPack", function() {
|
||||
/* eslint-enable indent */
|
||||
});
|
||||
});
|
||||
describe("getBuiltinMods()", function() {
|
||||
it("should work with versions before 2.0", function() {
|
||||
const builtinMods = ModPack.getBuiltinMods("1.1");
|
||||
assert.deepEqual(builtinMods, [
|
||||
{ name: "base", enabled: true, version: "1.1" },
|
||||
]);
|
||||
});
|
||||
it("should work with versions after 2.0", function() {
|
||||
const builtinMods = ModPack.getBuiltinMods("2.0");
|
||||
assert.deepEqual(builtinMods, [
|
||||
{ name: "base", enabled: true, version: "2.0" },
|
||||
{ name: "elevated-rails", enabled: false, version: "2.0" },
|
||||
{ name: "quality", enabled: false, version: "2.0" },
|
||||
{ name: "space-age", enabled: false, version: "2.0" },
|
||||
]);
|
||||
});
|
||||
});
|
||||
describe("getBuiltinModNames()", function() {
|
||||
it("should work with versions before 2.0", function() {
|
||||
const builtinModNames = ModPack.getBuiltinModNames("1.1");
|
||||
assert.deepEqual(builtinModNames, ["base"]);
|
||||
});
|
||||
it("should work with versions after 2.0", function() {
|
||||
const builtinModNames = ModPack.getBuiltinModNames("2.0");
|
||||
assert.deepEqual(builtinModNames, ["base", "elevated-rails", "quality", "space-age"]);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user