@@ -24,8 +24,8 @@ const SAMPLE_DATA = [
2424
2525describe ( 'getMedianPageSizeInches' , ( ) => {
2626 test ( 'handles single page data' , ( ) => {
27- const bm = new BookModel ( { data : SAMPLE_DATA . slice ( 0 , 1 ) , options : { ppi : 1 } } ) ;
28- expect ( bm . getMedianPageSizeInches ( ) ) . toEqual ( { width : 123 , height : 123 } ) ;
27+ const bm = new BookModel ( { data : SAMPLE_DATA . slice ( 0 , 1 ) , options : { ppi : 10 } } ) ;
28+ expect ( bm . getMedianPageSizeInches ( ) ) . toEqual ( { width : 12.3 , height : 12.3 } ) ;
2929 } ) ;
3030
3131 test ( 'handles odd pages data' , ( ) => {
@@ -39,8 +39,8 @@ describe('getMedianPageSizeInches', () => {
3939 Object . assign ( data [ 0 ] [ 0 ] , sizes [ 0 ] ) ;
4040 Object . assign ( data [ 1 ] [ 0 ] , sizes [ 1 ] ) ;
4141 Object . assign ( data [ 1 ] [ 1 ] , sizes [ 2 ] ) ;
42- const bm = new BookModel ( { data, options : { ppi : 1 } } ) ;
43- expect ( bm . getMedianPageSizeInches ( ) ) . toEqual ( { width : 200 , height : 2200 } ) ;
42+ const bm = new BookModel ( { data, options : { ppi : 10 } } ) ;
43+ expect ( bm . getMedianPageSizeInches ( ) ) . toEqual ( { width : 20 , height : 220 } ) ;
4444 } ) ;
4545
4646
@@ -56,8 +56,8 @@ describe('getMedianPageSizeInches', () => {
5656 Object . assign ( data [ 1 ] [ 0 ] , sizes [ 1 ] ) ;
5757 Object . assign ( data [ 1 ] [ 1 ] , sizes [ 2 ] ) ;
5858 Object . assign ( data [ 2 ] [ 0 ] , sizes [ 3 ] ) ;
59- const bm = new BookModel ( { data, options : { ppi : 1 } } ) ;
60- expect ( bm . getMedianPageSizeInches ( ) ) . toEqual ( { width : 300 , height : 2300 } ) ;
59+ const bm = new BookModel ( { data, options : { ppi : 10 } } ) ;
60+ expect ( bm . getMedianPageSizeInches ( ) ) . toEqual ( { width : 30 , height : 230 } ) ;
6161 } ) ;
6262
6363 test ( 'does not lexicographic sort for median' , ( ) => {
@@ -71,8 +71,8 @@ describe('getMedianPageSizeInches', () => {
7171 Object . assign ( data [ 0 ] [ 0 ] , sizes [ 0 ] ) ;
7272 Object . assign ( data [ 1 ] [ 0 ] , sizes [ 1 ] ) ;
7373 Object . assign ( data [ 1 ] [ 1 ] , sizes [ 2 ] ) ;
74- const bm = new BookModel ( { data, options : { ppi : 1 } } ) ;
75- expect ( bm . getMedianPageSizeInches ( ) ) . toEqual ( { width : 30 , height : 30 } ) ;
74+ const bm = new BookModel ( { data, options : { ppi : 10 } } ) ;
75+ expect ( bm . getMedianPageSizeInches ( ) ) . toEqual ( { width : 3 , height : 3 } ) ;
7676 } ) ;
7777
7878 test ( 'caches result' , ( ) => {
0 commit comments