mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(plugin): ♻️ Remove mandatory manifest inside Plugin constructor
This commit is contained in:
parent
d224d7b9b8
commit
c7221ae9d1
5 changed files with 6 additions and 97 deletions
|
|
@ -154,14 +154,7 @@ describe("PluginLoader", () => {
|
|||
});
|
||||
|
||||
test("loadPlugin should load and return a Plugin instance", async () => {
|
||||
const mockPlugin = new Plugin(
|
||||
{
|
||||
name: "test-plugin",
|
||||
version: "1.1.0",
|
||||
description: "Doobaee",
|
||||
},
|
||||
new PluginConfigManager(z.object({})),
|
||||
);
|
||||
const mockPlugin = new Plugin(new PluginConfigManager(z.object({})));
|
||||
mock.module("/some/path/index.ts", () => ({
|
||||
default: mockPlugin,
|
||||
}));
|
||||
|
|
@ -186,10 +179,7 @@ describe("PluginLoader", () => {
|
|||
version: "1.1.0",
|
||||
description: "Doobaee",
|
||||
};
|
||||
const mockPlugin = new Plugin(
|
||||
manifestContent,
|
||||
new PluginConfigManager(z.object({})),
|
||||
);
|
||||
const mockPlugin = new Plugin(new PluginConfigManager(z.object({})));
|
||||
|
||||
mockReaddir
|
||||
.mockResolvedValueOnce([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue