Bug 1406311 - more tests for devtools l10n numbers method;r=ochameau
MozReview-Commit-ID: EwJxfER0qyV
--- a/devtools/client/shared/test/browser_num-l10n.js
+++ b/devtools/client/shared/test/browser_num-l10n.js
@@ -17,11 +17,17 @@ function test() {
is(l10n.numberWithDecimals(1.0001, 2), "1",
"The third number was properly localized.");
is(l10n.numberWithDecimals(NaN, 2), "0",
"NaN was properly localized.");
is(l10n.numberWithDecimals(null, 2), "0",
"`null` was properly localized.");
is(l10n.numberWithDecimals(undefined, 2), "0",
"`undefined` was properly localized.");
+ is(l10n.numberWithDecimals(-1234.56789, 2), "-1,234.57",
+ "Negative number was properly localized.");
+ is(l10n.numberWithDecimals(1234.56789, 0), "1,235",
+ "Number was properly localized with decimals set 0.");
+ is(l10n.numberWithDecimals(-1234.56789, 0), "-1,235",
+ "Negative number was properly localized with decimals set 0.");
finish();
}