Skip to content

Commit 0fcfc4f

Browse files
committed
added missing plugin test
1 parent d9af163 commit 0fcfc4f

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { describe, it, expect } from "vitest";
2+
import mui from "./index";
3+
4+
describe("mui Plugin", () => {
5+
it("registers components", () => {
6+
const plugin = mui();
7+
expect(plugin).toBeTypeOf("object");
8+
expect(Array.isArray(plugin.components)).toBe(true);
9+
expect(plugin.components?.length).toBeGreaterThan(0);
10+
plugin.components?.forEach((componentRegistration) => {
11+
expect(componentRegistration).toHaveLength(2);
12+
const [name, component] = componentRegistration;
13+
expect(name).toBeTypeOf("string");
14+
expect(component).toBeTypeOf("function");
15+
});
16+
});
17+
});
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { describe, it, expect } from "vitest";
2+
import vega from "./index";
3+
4+
describe("vega Plugin", () => {
5+
it("registers components", () => {
6+
const plugin = vega();
7+
expect(plugin).toBeTypeOf("object");
8+
expect(Array.isArray(plugin.components)).toBe(true);
9+
expect(plugin.components?.length).toBeGreaterThan(0);
10+
plugin.components?.forEach((componentRegistration) => {
11+
expect(componentRegistration).toHaveLength(2);
12+
const [name, component] = componentRegistration;
13+
expect(name).toBeTypeOf("string");
14+
expect(component).toBeTypeOf("function");
15+
});
16+
});
17+
});

0 commit comments

Comments
 (0)