From 9fb5beb756b7e8c4d88f67de0caad13c4fe64e1b Mon Sep 17 00:00:00 2001 From: harttle Date: Mon, 24 Oct 2016 01:57:24 +0800 Subject: [PATCH] fix strftime test --- test/util/strftime.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/util/strftime.js b/test/util/strftime.js index 060fdc54d..bcc404450 100644 --- a/test/util/strftime.js +++ b/test/util/strftime.js @@ -9,11 +9,13 @@ describe('util/strftime', function() { expect(t(now, '%U')).to.equal('43'); }); it('should format locale date string', function() { - var date = now.toLocaleDateString('zh-CN'); - expect(t(now, '%Y-%m-%d')).to.equal(date); + var date = now.toLocaleDateString('en-US'); + expect(t(now, '%m/%d/%Y')).to.equal(date); }); it('should format locale date string', function() { - var time = now.toLocaleTimeString('zh-CN'); + var time = now.toLocaleTimeString({ + hour12: false + }); expect(t(now, '%H:%M:%S')).to.equal(time); }); });