We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c200c1c commit 5388749Copy full SHA for 5388749
2 files changed
test/fixtures/config.ts
@@ -0,0 +1,7 @@
1
+export const config = {
2
+ /** checked status */
3
+ checked: {
4
+ $default: false,
5
+ $schema: { deprecated: "use unchecked" },
6
+ },
7
+};
test/loader.test.ts
@@ -0,0 +1,39 @@
+import { describe, it, expect } from "vitest";
+import { loadSchema } from "../src/loader/loader";
+
+describe("loader", () => {
+ it("should load a schema", async () => {
+ const schema = await loadSchema("./test/fixtures/config.ts", {});
+ expect(schema).toMatchInlineSnapshot(`
8
+ {
9
+ "default": {
10
+ "config": {
11
+ "checked": false,
12
13
14
+ "id": "#",
15
+ "properties": {
16
17
18
19
20
+ "id": "#config",
21
22
+ "checked": {
23
+ "default": false,
24
+ "deprecated": "use unchecked",
25
+ "description": "",
26
+ "id": "#config/checked",
27
+ "tags": [],
28
+ "title": "",
29
+ "type": "boolean",
30
31
32
+ "type": "object",
33
34
35
36
+ }
37
+ `);
38
+ });
39
+});
0 commit comments