From 40e605452324f8fc5640fb9b7c798a38247cc81e Mon Sep 17 00:00:00 2001 From: Julian Simioni Date: Sat, 13 Oct 2018 11:36:07 -0400 Subject: [PATCH] chore(geo_common): assert that a specific exception was thrown Without checking the message when asserting an exception is thrown, it's possible for the test to pass when undesired behavior is occuring. --- test/unit/sanitizer/_geo_common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/sanitizer/_geo_common.js b/test/unit/sanitizer/_geo_common.js index 48485818..d0dc9f70 100644 --- a/test/unit/sanitizer/_geo_common.js +++ b/test/unit/sanitizer/_geo_common.js @@ -243,7 +243,7 @@ module.exports.tests.rect = function(test, common) { t.throws( function(){ sanitize.sanitize_rect( 'boundary.rect', clean, params, mandatory ); - }); + },/boundary.rect.min_lat \(0\) must be less than boundary.rect.max_lat \(0\)/); t.end(); }); @@ -294,7 +294,7 @@ module.exports.tests.rect = function(test, common) { t.throws( function() { sanitize.sanitize_rect( 'boundary.rect', clean, params, mandatory ); - }); + },/boundary.rect.min_lat \(52.7945\) must be less than boundary.rect.max_lat \(52.2387\)/, 'should error when min >= max'); t.end(); });