@@ -49,6 +49,7 @@ describe('AnnotationLayer', () => {
49
49
) ;
50
50
51
51
expect . assertions ( 1 ) ;
52
+
52
53
await expect ( onGetAnnotationsSuccessPromise ) . resolves . toMatchObject ( desiredAnnotations ) ;
53
54
} ) ;
54
55
@@ -67,6 +68,7 @@ describe('AnnotationLayer', () => {
67
68
) ;
68
69
69
70
expect . assertions ( 1 ) ;
71
+
70
72
await expect ( onGetAnnotationsErrorPromise ) . resolves . toBeInstanceOf ( Error ) ;
71
73
72
74
restoreConsole ( ) ;
@@ -85,6 +87,7 @@ describe('AnnotationLayer', () => {
85
87
) ;
86
88
87
89
expect . assertions ( 2 ) ;
90
+
88
91
await expect ( onGetAnnotationsSuccessPromise ) . resolves . toMatchObject ( desiredAnnotations ) ;
89
92
90
93
const { func : onGetAnnotationsSuccess2 , promise : onGetAnnotationsSuccessPromise2 } =
@@ -130,6 +133,7 @@ describe('AnnotationLayer', () => {
130
133
await onRenderAnnotationLayerSuccessPromise ;
131
134
132
135
const annotationItems = [ ...container . firstElementChild . children ] ;
136
+
133
137
expect ( annotationItems ) . toHaveLength ( desiredAnnotations . length ) ;
134
138
} ) ;
135
139
@@ -232,8 +236,9 @@ describe('AnnotationLayer', () => {
232
236
233
237
const annotationLayer = container . firstElementChild ;
234
238
235
- // Expect the annotation layer to be rotated
236
239
const viewport = page . getViewport ( { scale : 1 } ) ;
240
+
241
+ // Expect the annotation layer to be rotated
237
242
expect ( parseInt ( annotationLayer . style . width , 10 ) ) . toBe ( Math . floor ( viewport . width ) ) ;
238
243
expect ( parseInt ( annotationLayer . style . height , 10 ) ) . toBe ( Math . floor ( viewport . height ) ) ;
239
244
} ) ;
@@ -260,8 +265,9 @@ describe('AnnotationLayer', () => {
260
265
261
266
const annotationLayer = container . firstElementChild ;
262
267
263
- // Expect the annotation layer to be scaled
264
268
const viewport = page . getViewport ( { scale } ) ;
269
+
270
+ // Expect the annotation layer to be scaled
265
271
expect ( parseInt ( annotationLayer . style . width , 10 ) ) . toBe ( Math . floor ( viewport . width ) ) ;
266
272
expect ( parseInt ( annotationLayer . style . height , 10 ) ) . toBe ( Math . floor ( viewport . height ) ) ;
267
273
} ) ;
@@ -292,6 +298,7 @@ describe('AnnotationLayer', () => {
292
298
await onRenderAnnotationLayerSuccessPromise ;
293
299
294
300
const stringifiedAnnotationLayerNode = container . outerHTML ;
301
+
295
302
expect ( stringifiedAnnotationLayerNode ) . toMatch ( desiredImageTagRegExp ) ;
296
303
} ) ;
297
304
@@ -322,6 +329,7 @@ describe('AnnotationLayer', () => {
322
329
await onRenderAnnotationLayerSuccessPromise ;
323
330
324
331
const stringifiedAnnotationLayerNode = container . outerHTML ;
332
+
325
333
expect ( stringifiedAnnotationLayerNode ) . toMatch ( desiredImageTagRegExp ) ;
326
334
} ) ;
327
335
} ) ;
0 commit comments