@@ -17,7 +17,7 @@ describe('Read file', () => {
1717 // http://www.unidata.ucar.edu/software/netcdf/examples/madis-sao.cdl
1818 const data = readFileSync ( `${ pathFiles } madis-sao.nc` ) ;
1919
20- let reader = new NetCDFReader ( data ) ;
20+ const reader = new NetCDFReader ( data ) ;
2121 expect ( reader . version ) . toBe ( 'classic format' ) ;
2222 expect ( reader . recordDimension ) . toStrictEqual ( {
2323 length : 178 ,
@@ -94,14 +94,14 @@ describe('Read file', () => {
9494
9595 it ( 'read non-record variable' , ( ) => {
9696 const data = readFileSync ( `${ pathFiles } madis-sao.nc` ) ;
97- let reader = new NetCDFReader ( data ) ;
97+ const reader = new NetCDFReader ( data ) ;
9898
9999 expect ( reader . getDataVariable ( 'nStaticIds' ) [ 0 ] ) . toBe ( 145 ) ;
100100 } ) ;
101101
102102 it ( 'read 2 dimensional variable' , ( ) => {
103103 const data = readFileSync ( `${ pathFiles } ichthyop.nc` ) ;
104- let reader = new NetCDFReader ( data ) ;
104+ const reader = new NetCDFReader ( data ) ;
105105 expect ( reader . getDataVariable ( 'time' ) ) . toHaveLength ( 49 ) ;
106106 expect ( reader . getDataVariable ( 'time' ) [ 0 ] ) . toBe ( 1547070300 ) ;
107107 expect ( reader . getDataVariable ( 'lat' ) ) . toHaveLength ( 49 ) ;
@@ -112,21 +112,21 @@ describe('Read file', () => {
112112
113113 it ( 'read record variable with string' , ( ) => {
114114 const data = readFileSync ( `${ pathFiles } madis-sao.nc` ) ;
115- let reader = new NetCDFReader ( data ) ;
115+ const reader = new NetCDFReader ( data ) ;
116116
117- let record = reader . getDataVariable ( 'wmoId' ) ;
117+ const record = reader . getDataVariable ( 'wmoId' ) ;
118118 expect ( record [ 0 ] ) . toBe ( 71419 ) ;
119119 expect ( record [ 1 ] ) . toBe ( 71415 ) ;
120120 expect ( record [ 2 ] ) . toBe ( 71408 ) ;
121121 } ) ;
122122
123123 it ( 'read non-record variable with object' , ( ) => {
124124 const data = readFileSync ( `${ pathFiles } madis-sao.nc` ) ;
125- let reader = new NetCDFReader ( data ) ;
126- let variables = reader . variables ;
125+ const reader = new NetCDFReader ( data ) ;
126+ const variables = reader . variables ;
127127
128- let withString = reader . getDataVariable ( 'staticIds' ) ;
129- let withObject = reader . getDataVariable ( variables [ 1 ] ) ;
128+ const withString = reader . getDataVariable ( 'staticIds' ) ;
129+ const withObject = reader . getDataVariable ( variables [ 1 ] ) ;
130130 expect ( withString [ 0 ] ) . toBe ( 'W' ) ;
131131 expect ( withString [ 1 ] ) . toBe ( 'A' ) ;
132132 expect ( withString [ 2 ] ) . toBe ( 'F' ) ;
@@ -137,7 +137,7 @@ describe('Read file', () => {
137137
138138 it ( 'read non-existent variable string' , ( ) => {
139139 const data = readFileSync ( `${ pathFiles } madis-sao.nc` ) ;
140- let reader = new NetCDFReader ( data ) ;
140+ const reader = new NetCDFReader ( data ) ;
141141
142142 expect ( reader . getDataVariable . bind ( reader , "n'importe quoi" ) ) . toThrow (
143143 'Not a valid NetCDF v3.x file: variable not found' ,
@@ -146,21 +146,21 @@ describe('Read file', () => {
146146
147147 it ( 'read 64 bit offset file' , ( ) => {
148148 const data = readFileSync ( `${ pathFiles } model1_md2.nc` ) ;
149- let reader = new NetCDFReader ( data ) ;
149+ const reader = new NetCDFReader ( data ) ;
150150 expect ( reader . version ) . toBe ( '64-bit offset format' ) ;
151151 expect ( reader . getDataVariable ( 'cell_angular' ) [ 0 ] ) . toBe ( 'a' ) ;
152152 expect ( reader . getDataVariable ( 'cell_spatial' ) [ 0 ] ) . toBe ( 'a' ) ;
153153 } ) ;
154154
155155 it ( 'read agilent hplc file file' , ( ) => {
156156 const data = readFileSync ( `${ pathFiles } agilent_hplc.cdf` ) ;
157- let reader = new NetCDFReader ( data ) ;
157+ const reader = new NetCDFReader ( data ) ;
158158
159159 expect ( reader . version ) . toBe ( 'classic format' ) ;
160160
161- let variables = [ ] ;
161+ const variables = [ ] ;
162162
163- for ( let variable of reader . variables ) {
163+ for ( const variable of reader . variables ) {
164164 const value = reader . getDataVariable ( variable ) ;
165165 variables . push ( { value, ...variable } ) ;
166166 }
0 commit comments