Skip to content

Commit

Permalink
fix test after #85
Browse files Browse the repository at this point in the history
  • Loading branch information
Fil committed Jul 27, 2020
1 parent 4cedafa commit 09d57d9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/defaultLocale-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ tape("d3.utcParse(specifier) defaults to en-US", function(test) {
tape("d3.timeFormatDefaultLocale(definition) returns the new default locale", function(test) {
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(locale.format("%c")(new Date(2000, 0, 1)), "samedi, le 1 janvier 2000, 00:00:00");
test.equal(locale.format("%c")(new Date(2000, 0, 1)), "samedi 1 janvier 2000 à 00:00:00");
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
Expand All @@ -37,7 +37,7 @@ tape("d3.timeFormatDefaultLocale(definition) affects d3.timeFormat", function(te
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(d3.timeFormat, locale.format);
test.equal(d3.timeFormat("%c")(new Date(2000, 0, 1)), "samedi, le 1 janvier 2000, 00:00:00");
test.equal(d3.timeFormat("%c")(new Date(2000, 0, 1)), "samedi 1 janvier 2000 à 00:00:00");
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
Expand All @@ -48,7 +48,7 @@ tape("d3.timeFormatDefaultLocale(definition) affects d3.timeParse", function(tes
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(d3.timeParse, locale.parse);
test.equal(+d3.timeParse("%c")("samedi, le 1 janvier 2000, 00:00:00"), +new Date(2000, 0, 1));
test.equal(+d3.timeParse("%c")("samedi 1 janvier 2000 à 00:00:00"), +new Date(2000, 0, 1));
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
Expand All @@ -59,7 +59,7 @@ tape("d3.timeFormatDefaultLocale(definition) affects d3.utcFormat", function(tes
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(d3.utcFormat, locale.utcFormat);
test.equal(d3.utcFormat("%c")(new Date(Date.UTC(2000, 0, 1))), "samedi, le 1 janvier 2000, 00:00:00");
test.equal(d3.utcFormat("%c")(new Date(Date.UTC(2000, 0, 1))), "samedi 1 janvier 2000 à 00:00:00");
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
Expand All @@ -70,7 +70,7 @@ tape("d3.timeFormatDefaultLocale(definition) affects d3.utcParse", function(test
var locale = d3.timeFormatDefaultLocale(frFr);
try {
test.equal(d3.utcParse, locale.utcParse);
test.equal(+d3.utcParse("%c")("samedi, le 1 janvier 2000, 00:00:00"), +new Date(Date.UTC(2000, 0, 1)));
test.equal(+d3.utcParse("%c")("samedi 1 janvier 2000 à 00:00:00"), +new Date(Date.UTC(2000, 0, 1)));
test.end();
} finally {
d3.timeFormatDefaultLocale(enUs);
Expand Down

0 comments on commit 09d57d9

Please sign in to comment.