en.javascript.info/1-js/4-data-structures/11-datetime/2-get-week-day/_js.view/test.js
2015-03-09 18:48:58 +03:00

29 lines
No EOL
925 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

describe("getWeekDay", function() {
it("3 января 2014 - пятница", function() {
assert.equal(getWeekDay(new Date(2014, 0, 3)), 'пт');
});
it("4 января 2014 - суббота", function() {
assert.equal(getWeekDay(new Date(2014, 0, 4)), 'сб');
});
it("5 января 2014 - воскресенье", function() {
assert.equal(getWeekDay(new Date(2014, 0, 5)), 'вс');
});
it("6 января 2014 - понедельник", function() {
assert.equal(getWeekDay(new Date(2014, 0, 6)), 'пн');
});
it("7 января 2014 - вторник", function() {
assert.equal(getWeekDay(new Date(2014, 0, 7)), 'вт');
});
it("8 января 2014 - среда", function() {
assert.equal(getWeekDay(new Date(2014, 0, 8)), 'ср');
});
it("9 января 2014 - четверг", function() {
assert.equal(getWeekDay(new Date(2014, 0, 9)), 'чт');
});
});