@@ -10,6 +10,7 @@ async function callServer(timestamp = new Date().getTime(), query: string, expec
1010 params . set ( "timestamp" , timestamp . toString ( ) ) ;
1111 url . search = params . toString ( ) ;
1212
13+
1314 let response ;
1415 if ( expectStatus == 200 ) {
1516 if ( method == "GET" ) {
@@ -53,6 +54,8 @@ async function verifiedRequest(url: string, token: string) {
5354 return response ;
5455}
5556
57+
58+
5659describe ( 'HEAD /write' , ( ) => {
5760 // eslint-disable-next-line jest/expect-expect
5861 it ( 'with all parameters correctly set it should succeed' , async ( ) => {
@@ -114,7 +117,7 @@ describe("GET /write", () => {
114117 const filePath = path . resolve ( dirPath , `data-${ formattedDate } .json` ) ;
115118
116119 it ( 'there should a file of the current date' , async ( ) => {
117- await await callServer ( undefined , "user=xx&lat=52.51451&lon=13.35105×tamp=R3Pl4C3&hdop=20.0&altitude=5000.000&speed=150.000&heading=180.0&key=test" , 200 , "GET" ) ;
120+ await callServer ( undefined , "user=xx&lat=52.51451&lon=13.35105×tamp=R3Pl4C3&hdop=20.0&altitude=5000.000&speed=150.000&heading=180.0&key=test" , 200 , "GET" ) ;
118121
119122 fs . access ( filePath , fs . constants . F_OK , ( err ) => {
120123 expect ( err ) . toBeFalsy ( ) ;
@@ -198,7 +201,7 @@ describe("GET /write", () => {
198201 expect ( entry . ignore ) . toBe ( false ) ; // current one to be false allways
199202 expect ( lastEntry . ignore ) . toBe ( true ) ; // last one to high hdop to be true
200203
201- await await callServer ( undefined , "user=xx&lat=52.51627&lon=13.37770×tamp=R3Pl4C3&hdop=50&altitude=4000.000&speed=150.000&heading=180.0&key=test" , 200 , "GET" ) ;
204+ await callServer ( undefined , "user=xx&lat=52.51627&lon=13.37770×tamp=R3Pl4C3&hdop=50&altitude=4000.000&speed=150.000&heading=180.0&key=test" , 200 , "GET" ) ;
202205 jsonData = getData ( filePath ) ;
203206 entry = jsonData . entries [ 1 ] ; // same data point, but not last now therefore ignore true
204207 expect ( entry . ignore ) . toBe ( true ) ;
@@ -229,7 +232,7 @@ describe('API calls', () => {
229232describe ( 'read and login' , ( ) => {
230233 let token = "" ;
231234 const testData = qs . stringify ( {
232- user : "test " ,
235+ user : "TEST " ,
233236 password : "test" ,
234237 } ) ;
235238 test ( `redirect without logged in` , async ( ) => {
0 commit comments