File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ export const config = {
2
+ /** checked status */
3
+ checked : {
4
+ $default : false ,
5
+ $schema : { deprecated : "use unchecked" } ,
6
+ } ,
7
+ } ;
Original file line number Diff line number Diff line change
1
+ import { describe , it , expect } from "vitest" ;
2
+ import { loadSchema } from "../src/loader/loader" ;
3
+
4
+ describe ( "loader" , ( ) => {
5
+ it ( "should load a schema" , async ( ) => {
6
+ const schema = await loadSchema ( "./test/fixtures/config.ts" , { } ) ;
7
+ expect ( schema ) . toMatchInlineSnapshot ( `
8
+ {
9
+ "default": {
10
+ "config": {
11
+ "checked": false,
12
+ },
13
+ },
14
+ "id": "#",
15
+ "properties": {
16
+ "config": {
17
+ "default": {
18
+ "checked": false,
19
+ },
20
+ "id": "#config",
21
+ "properties": {
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
+ "type": "object",
36
+ }
37
+ ` ) ;
38
+ } ) ;
39
+ } ) ;
You can’t perform that action at this time.
0 commit comments