@@ -51,7 +51,7 @@ describe("presentation-4 specific resource parity", () => {
5151 const normalizedAnnotation = result . entities . Annotation [ "https://example.org/canvas/1/annotation/1" ] as any ;
5252 const normalizedStart = result . entities . ContentResource [ normalizedManifest . start . id ] as any ;
5353 const normalizedRangeItem = result . entities . ContentResource [ normalizedRange . items [ 0 ] . id ] as any ;
54- const normalizedTarget = result . entities . ContentResource [ normalizedAnnotation . target . id ] as any ;
54+ const normalizedTarget = normalizedAnnotation . target ;
5555 const startSelector = normalizedStart . selector [ 0 ] ;
5656 const rangeSelector = normalizedRangeItem . selector [ 0 ] ;
5757 const targetSelector = normalizedTarget . selector [ 0 ] ;
@@ -68,11 +68,12 @@ describe("presentation-4 specific resource parity", () => {
6868 expect ( rangeSelector . type ) . toBe ( "FragmentSelector" ) ;
6969 expect ( rangeSelector . value ) . toBe ( "t=0,10" ) ;
7070
71- expect ( normalizedAnnotation . target . type ) . toBe ( "ContentResource " ) ;
71+ expect ( normalizedAnnotation . target . type ) . toBe ( "SpecificResource " ) ;
7272 expect ( normalizedAnnotation . target . id . startsWith ( "vault://iiif-parser/v4/SpecificResource/" ) ) . toBe ( true ) ;
7373 expect ( normalizedTarget . source . id ) . toBe ( "https://example.org/canvas/1" ) ;
7474 expect ( targetSelector . type ) . toBe ( "FragmentSelector" ) ;
7575 expect ( targetSelector . value ) . toBe ( "xywh=10,20,30,40" ) ;
76+ expect ( result . entities . ContentResource [ normalizedAnnotation . target . id ] ) . toBeUndefined ( ) ;
7677
7778 expect ( targetSelector ) . toMatchInlineSnapshot ( `
7879 {
@@ -138,13 +139,14 @@ describe("presentation-4 specific resource parity", () => {
138139
139140 const normalized = normalize ( manifest as any ) ;
140141 const annotation = normalized . entities . Annotation [ "https://example.org/canvas/1/annotation/1" ] as any ;
141- const target = normalized . entities . ContentResource [ annotation . target . id ] as any ;
142+ const target = annotation . target ;
142143 const targetSelector = target . selector [ 0 ] ;
143144
144- expect ( annotation . target . type ) . toBe ( "ContentResource " ) ;
145+ expect ( annotation . target . type ) . toBe ( "SpecificResource " ) ;
145146 expect ( target . source . id ) . toBe ( "https://example.org/canvas/1" ) ;
146147 expect ( targetSelector . type ) . toBe ( "FragmentSelector" ) ;
147148 expect ( targetSelector . value ) . toBe ( "xywh=11,22,33,44" ) ;
149+ expect ( normalized . entities . ContentResource [ annotation . target . id ] ) . toBeUndefined ( ) ;
148150
149151 const serialized = serialize < any > (
150152 {
@@ -210,10 +212,11 @@ describe("presentation-4 specific resource parity", () => {
210212
211213 const normalized = normalize ( manifest as any ) ;
212214 const annotation = normalized . entities . Annotation [ "https://example.org/canvas/1/annotation/1" ] as any ;
213- const target = normalized . entities . ContentResource [ annotation . target . id ] as any ;
215+ const target = annotation . target ;
214216
215217 expect ( target . source . id ) . toBe ( "https://example.org/canvas/1" ) ;
216218 expect ( target . source . type ) . toBe ( "Canvas" ) ;
217219 expect ( Array . isArray ( target . source ) ) . toBe ( false ) ;
220+ expect ( normalized . entities . ContentResource [ target . id ] ) . toBeUndefined ( ) ;
218221 } ) ;
219222} ) ;
0 commit comments