@@ -2,7 +2,7 @@ import { strict as assert } from "assert";
2
2
import { compileSchema } from "../../compileSchema" ;
3
3
import CSNSchema from "./csn-interop-effective.schema.json" ;
4
4
5
- describe . only ( "issue#79 - csn ref resolution from defintions" , ( ) => {
5
+ describe ( "issue#79 - csn ref resolution from defintions" , ( ) => {
6
6
it ( "should compile as draft-07" , ( ) => {
7
7
const node = compileSchema ( CSNSchema ) ;
8
8
assert . equal ( node . getDraftVersion ( ) , "draft-07" ) ;
@@ -13,16 +13,27 @@ describe.only("issue#79 - csn ref resolution from defintions", () => {
13
13
assert ( node . $defs ?. [ "@EndUserText.label" ] != null ) ;
14
14
} ) ;
15
15
16
- it . skip ( "should resolve $ref '#/$defs/@EndUserText.label'" , ( ) => {
16
+ it ( "should resolve $ref '#/$defs/@EndUserText.label'" , ( ) => {
17
17
const node = compileSchema ( CSNSchema ) ;
18
18
const childSchema = node . getNodeRef ( "#/$defs/@EndUserText.label" ) ;
19
19
assert ( childSchema != null ) ;
20
20
} ) ;
21
21
22
- it . skip ( "should resolve $ref '#/definitions/@EndUserText.label'" , ( ) => {
22
+ it ( "should resolve uri-encoded $ref '#/%24defs/%40EndUserText.label'" , ( ) => {
23
+ const node = compileSchema ( CSNSchema ) ;
24
+ const childSchema = node . getNodeRef ( "#/%24defs/%40EndUserText.label" ) ;
25
+ assert ( childSchema != null ) ;
26
+ } ) ;
27
+
28
+ it ( "should resolve $ref '#/definitions/@EndUserText.label'" , ( ) => {
23
29
const node = compileSchema ( CSNSchema ) ;
24
30
const childSchema = node . getNodeRef ( "#/definitions/@EndUserText.label" ) ;
25
- console . log ( "childSchema" , childSchema ) ;
31
+ assert ( childSchema != null ) ;
32
+ } ) ;
33
+
34
+ it ( "should resolve uri-encoded $ref '#/definitions/%40EndUserText.label'" , ( ) => {
35
+ const node = compileSchema ( CSNSchema ) ;
36
+ const childSchema = node . getNodeRef ( "#/definitions/%40EndUserText.label" ) ;
26
37
assert ( childSchema != null ) ;
27
38
} ) ;
28
39
0 commit comments