beautify_js
This commit is contained in:
parent
0febe4f5fd
commit
5c2f32e184
208 changed files with 3891 additions and 1474 deletions
|
@ -1,18 +1,18 @@
|
|||
describe("formatDate", function() {
|
||||
it("выводит дату 1мс назад как \"только что\"", function() {
|
||||
assert.equal( formatDate( new Date(new Date - 1) ), 'только что' );
|
||||
assert.equal(formatDate(new Date(new Date - 1)), 'только что');
|
||||
});
|
||||
|
||||
it('выводит дату "30 сек назад"', function() {
|
||||
assert.equal( formatDate( new Date( new Date - 30*1000) ), "30 сек. назад" );
|
||||
assert.equal(formatDate(new Date(new Date - 30 * 1000)), "30 сек. назад");
|
||||
});
|
||||
|
||||
it('выводит дату "5 мин назад"', function() {
|
||||
assert.equal( formatDate( new Date( new Date- 5*60*1000) ), "5 мин. назад");
|
||||
assert.equal(formatDate(new Date(new Date - 5 * 60 * 1000)), "5 мин. назад");
|
||||
});
|
||||
|
||||
it("выводит старую дату в формате дд.мм.гг чч:мм", function() {
|
||||
assert.equal( formatDate( new Date(2014, 2, 1, 11, 22, 33) ), "01.03.14 11:22" );
|
||||
assert.equal(formatDate(new Date(2014, 2, 1, 11, 22, 33)), "01.03.14 11:22");
|
||||
});
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue