From 4850b57c6fd3a6eb26d8def1e0fbc91dcd741cfa Mon Sep 17 00:00:00 2001 From: "Laura, Jason R" Date: Thu, 6 Apr 2023 09:56:32 -0700 Subject: [PATCH] Fixes AstroMath tests --- package.json | 1 + test/AstroMathTest.js | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index ae6557c7f..85f0ee223 100644 --- a/package.json +++ b/package.json @@ -90,6 +90,7 @@ "jquery": "^3.6.0", "leaflet": "^1.7.1", "leaflet-draw": "^1.0.4", + "mocha-jsdom": "^2.0.0", "proj4leaflet": "^1.0.2", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/test/AstroMathTest.js b/test/AstroMathTest.js index a0d38b99f..01666cbf0 100644 --- a/test/AstroMathTest.js +++ b/test/AstroMathTest.js @@ -63,10 +63,10 @@ describe('Testing AstroMath Functions', function() { }) // testing lonTo360 function - it('Testing lonTo360 Cylindrical: 0 should be 180 ', function() { + it('Testing lonTo360 Cylindrical: 0 should be 0 ', function() { // add an assertion let majorRadius = testMath.lonTo360(0, "EPSG:4326"); - expect(majorRadius).to.equal(180); + expect(majorRadius).to.equal(0); }) // testing lonTo360 function @@ -86,7 +86,7 @@ describe('Testing AstroMath Functions', function() { // testing domainToPositiveWest function it('Testing domainToPositiveWest Not Normal Range: 0 should be 360 ', function() { // add an assertion - let majorRadius = testMath.domainToPositiveWest(-180, false); + let majorRadius = testMath.domainToPositiveWest(-180, true); expect(majorRadius).to.equal(180); }) -- GitLab