diff --git a/test/__snapshots__/test/test.ts.md b/test/__snapshots__/test/test.ts.md index 14735757..a5b00deb 100644 --- a/test/__snapshots__/test/test.ts.md +++ b/test/__snapshots__/test/test.ts.md @@ -10898,3 +10898,25 @@ Generated by [AVA](https://avajs.dev). [k: string]: any;␊ }␊ ` + +## Normalize $defs to definitions + +> Snapshot 1 + + `{␊ + "id": "foo",␊ + "definitions": {␊ + "bar": "baz"␊ + }␊ + }` + +## Normalize const to singleton enum + +> Snapshot 1 + + `{␊ + "id": "foo",␊ + "enum": [␊ + "foobar"␊ + ]␊ + }` diff --git a/test/__snapshots__/test/test.ts.snap b/test/__snapshots__/test/test.ts.snap index 1c68e3e4..1eab9dcc 100644 Binary files a/test/__snapshots__/test/test.ts.snap and b/test/__snapshots__/test/test.ts.snap differ diff --git a/test/normalizer/constToEnum.json b/test/normalizer/constToEnum.json new file mode 100644 index 00000000..9e3567c6 --- /dev/null +++ b/test/normalizer/constToEnum.json @@ -0,0 +1,11 @@ +{ + "name": "Normalize const to singleton enum", + "in": { + "id": "foo", + "const": "foobar" + }, + "out": { + "id": "foo", + "enum": ["foobar"] + } +} diff --git a/test/normalizer/defsToDefinitions.json b/test/normalizer/defsToDefinitions.json new file mode 100644 index 00000000..050ca47f --- /dev/null +++ b/test/normalizer/defsToDefinitions.json @@ -0,0 +1,15 @@ +{ + "name": "Normalize $defs to definitions", + "in": { + "id": "foo", + "$defs" : { + "bar": "baz" + } + }, + "out": { + "id": "foo", + "definitions" : { + "bar": "baz" + } + } +}