@@ -2,7 +2,7 @@ import { strict as assert } from "assert";
22import { compileSchema } from "../../compileSchema" ;
33import CSNSchema from "./csn-interop-effective.schema.json" ;
44
5- describe . only ( "issue#79 - csn ref resolution from defintions" , ( ) => {
5+ describe ( "issue#79 - csn ref resolution from defintions" , ( ) => {
66 it ( "should compile as draft-07" , ( ) => {
77 const node = compileSchema ( CSNSchema ) ;
88 assert . equal ( node . getDraftVersion ( ) , "draft-07" ) ;
@@ -13,16 +13,27 @@ describe.only("issue#79 - csn ref resolution from defintions", () => {
1313 assert ( node . $defs ?. [ "@EndUserText.label" ] != null ) ;
1414 } ) ;
1515
16- it . skip ( "should resolve $ref '#/$defs/@EndUserText.label'" , ( ) => {
16+ it ( "should resolve $ref '#/$defs/@EndUserText.label'" , ( ) => {
1717 const node = compileSchema ( CSNSchema ) ;
1818 const childSchema = node . getNodeRef ( "#/$defs/@EndUserText.label" ) ;
1919 assert ( childSchema != null ) ;
2020 } ) ;
2121
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'" , ( ) => {
2329 const node = compileSchema ( CSNSchema ) ;
2430 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" ) ;
2637 assert ( childSchema != null ) ;
2738 } ) ;
2839
0 commit comments