mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 23:33:13 +09:00
Refactor, fix linting issues
This commit is contained in:
1 parent
79c4bf1441
commit
427acfe82e
2 files changed
+34
-21
No files matched your search
@@ -133,7 +133,7 @@ describe("lib/plugin_loader", function() {
|
||||
JSON.stringify({
|
||||
name: path.basename(pluginPath),
|
||||
version: "0.0.1",
|
||||
keywords: ["clusterio-plugin"]
|
||||
keywords: ["clusterio-plugin"],
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -149,8 +149,8 @@ describe("lib/plugin_loader", function() {
|
||||
path.join(baseDir, "package.json"),
|
||||
JSON.stringify({
|
||||
dependencies: {
|
||||
"npm-plugin": "^1.0.0"
|
||||
}
|
||||
"npm-plugin": "^1.0.0",
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
@@ -176,14 +176,13 @@ describe("lib/plugin_loader", function() {
|
||||
it("should load existing plugin list", async function() {
|
||||
const existingList = new Map([["test", "/test/path"]]);
|
||||
await fs.outputFile(pluginListPath, JSON.stringify([...existingList]));
|
||||
const pluginList = await lib.loadPluginList(pluginListPath, false);
|
||||
assert.ok(pluginList.has("test"));
|
||||
assert.strictEqual(pluginList.get("test"), "/test/path");
|
||||
const loadedPlugins = await lib.loadPluginList(pluginListPath, false);
|
||||
assert.ok(loadedPlugins.has("test"));
|
||||
assert.strictEqual(loadedPlugins.get("test"), "/test/path");
|
||||
});
|
||||
|
||||
after(async function() {
|
||||
process.chdir(old_cwd);
|
||||
console.log(baseDir, process.cwd());
|
||||
await fs.remove(baseDir);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user