Skip to content

Commit

Permalink
test(e2e): improve message string formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-win committed Oct 25, 2023
1 parent b5fb91a commit c8d8af7
Showing 1 changed file with 5 additions and 41 deletions.
46 changes: 5 additions & 41 deletions test/e2e/testModes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,7 @@ module.exports = [
Math.abs(cell.lon - lon) < 0.0000000001
? 0
: 1,
message:
code +
": " +
cell.lat +
", " +
cell.lon +
" (" +
lat +
", " +
lon +
")",
message: `${code}: ${cell.lat}, ${cell.lon} (${lat}, ${lon})`,
};
},
},
Expand All @@ -45,8 +35,7 @@ module.exports = [

return {
err: cell.x === X && cell.y === Y ? 0 : 1,
message:
code + ": " + cell.x + ", " + cell.y + " (" + X + ", " + Y + ")",
message: `${code}: ${cell.x}, ${cell.y} (${X}, ${Y})`,
};
},
},
Expand All @@ -64,17 +53,7 @@ module.exports = [

return {
err: cell.code === code ? 0 : 1,
message:
level +
", " +
lat +
", " +
lon +
": " +
cell.code +
" (" +
code +
")",
message: `${level}, ${lat}, ${lon}: ${cell.code} (${code})`,
};
},
},
Expand All @@ -93,21 +72,7 @@ module.exports = [

return {
err: XY.x === X && XY.y === Y ? 0 : 1,
message:
level +
", " +
lat +
", " +
lon +
": " +
XY.x +
", " +
XY.y +
" (" +
X +
", " +
Y +
")",
message: `${level}, ${lat}, ${lon}: ${XY.x}, ${XY.y} (${X}, ${Y})`,
};
},
},
Expand All @@ -125,8 +90,7 @@ module.exports = [

return {
err: cell.code === code ? 0 : 1,
message:
level + ", " + X + ", " + Y + ": " + cell.code + " (" + code + ")",
message: `${level}, ${X}, ${Y}: ${cell.code} (${code})`,
};
},
},
Expand Down

0 comments on commit c8d8af7

Please sign in to comment.