@@ -6,20 +6,20 @@ expect.extend({ toBeDeepCloseTo, toMatchCloseTo });
66
77describe ( 'calibrateX' , ( ) => {
88 it ( 'undefined params' , ( ) => {
9- let data = {
9+ const data = {
1010 x : Float64Array . from ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 ] ) ,
1111 y : Float64Array . from ( [ 1 , 1 , 1 , 1 , 1 , 1 , 700 , 1 , 1 , 1 , 1 , 1 , 1 ] ) ,
1212 } ;
1313
14- let shifted = calibrateX ( data ) ;
14+ const shifted = calibrateX ( data ) ;
1515 expect ( shifted . data . x ) . toMatchCloseTo (
1616 Float64Array . from ( [ - 6 , - 5 , - 4 , - 3 , - 2 , - 1 , 0 , 1 , 2 , 3 , 4 , 5 , 6 ] ) ,
1717 ) ;
1818 expect ( shifted . data . y ) . toStrictEqual ( data . y ) ;
1919 } ) ;
2020
2121 it ( 'too small data' , ( ) => {
22- let data = {
22+ const data = {
2323 x : Float64Array . from ( [ 0 , 1 , 2 , 3 ] ) ,
2424 y : Float64Array . from ( [ 1 , 1 , 5 , 1 ] ) ,
2525 } ;
@@ -29,12 +29,12 @@ describe('calibrateX', () => {
2929 } ) ;
3030
3131 it ( 'no shift' , ( ) => {
32- let data = {
32+ const data = {
3333 x : Float64Array . from ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 ] ) ,
3434 y : Float64Array . from ( [ 1 , 1 , 5 , 1 , 1 , 1 , 700 , 1 , 1 , 1 , 1 , 1 , 1 ] ) ,
3535 } ;
3636
37- let gsdOptions = {
37+ const gsdOptions = {
3838 minMaxRatio : 0.4 ,
3939 realTopDetection : true ,
4040 smoothY : true ,
@@ -44,7 +44,7 @@ describe('calibrateX', () => {
4444 } ,
4545 } ;
4646
47- let shifted = calibrateX ( data , {
47+ const shifted = calibrateX ( data , {
4848 from : 1 ,
4949 to : 10 ,
5050 targetX : 6 ,
@@ -58,12 +58,12 @@ describe('calibrateX', () => {
5858 } ) ;
5959
6060 it ( 'shift of 2' , ( ) => {
61- let data = {
61+ const data = {
6262 x : Float64Array . from ( [ 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 ] ) ,
6363 y : Float64Array . from ( [ 1 , 1 , 1 , 1 , 700 , 1 , 5 , 1 , 1 , 1 , 1 , 1 , 1 ] ) ,
6464 } ;
6565
66- let gsdOptions = {
66+ const gsdOptions = {
6767 minMaxRatio : 0.4 ,
6868 realTopDetection : true ,
6969 smoothY : true ,
@@ -73,7 +73,7 @@ describe('calibrateX', () => {
7373 } ,
7474 } ;
7575
76- let shifted = calibrateX ( data , {
76+ const shifted = calibrateX ( data , {
7777 targetX : 6 ,
7878 gsd : gsdOptions ,
7979 from : 1 ,
@@ -89,7 +89,7 @@ describe('calibrateX', () => {
8989 } ) ;
9090
9191 it ( '2 peaks' , ( ) => {
92- let data = {
92+ const data = {
9393 x : Float64Array . from ( [
9494 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 ,
9595 20 ,
@@ -99,7 +99,7 @@ describe('calibrateX', () => {
9999 ] ) ,
100100 } ;
101101
102- let gsdOptions = {
102+ const gsdOptions = {
103103 minMaxRatio : 0.4 ,
104104 realTopDetection : true ,
105105 smoothY : true ,
@@ -109,7 +109,7 @@ describe('calibrateX', () => {
109109 } ,
110110 } ;
111111
112- let shifted = calibrateX ( data , {
112+ const shifted = calibrateX ( data , {
113113 targetX : 6 ,
114114 gsd : gsdOptions ,
115115 nbPeaks : 2 ,
0 commit comments