Add birthday previews and restore checklist taps
This commit is contained in:
parent
d2c7f004ea
commit
aaa3013890
11 changed files with 146 additions and 27 deletions
14
tests/test_calendar.js
Normal file
14
tests/test_calendar.js
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
const assert = require("node:assert/strict");
|
||||
const calendar = require("../static/calendar.js");
|
||||
|
||||
const birthdays = {
|
||||
spring: { 4: ["Kent", 2], 7: ["Lewis"] }
|
||||
};
|
||||
|
||||
assert.equal(calendar.birthdayOn(birthdays, "spring", 4, 1), null);
|
||||
assert.equal(calendar.birthdayOn(birthdays, "spring", 4, 2), "Kent");
|
||||
assert.equal(calendar.birthdayOn(birthdays, "spring", 7, 1), "Lewis");
|
||||
assert.equal(calendar.birthdayOn(birthdays, "spring", 7, 2), "Lewis");
|
||||
assert.equal(calendar.birthdayOn(birthdays, "spring", 8, 1), null);
|
||||
|
||||
console.log("calendar tests passed");
|
||||
Loading…
Add table
Add a link
Reference in a new issue