update tests

This commit is contained in:
CuriousMagpie
2024-09-05 11:04:08 -04:00
committed by Phillip Thelen
parent 88a1cfb689
commit e559fb7e4b
3 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ describe('events', () => {
it('returns events when active', () => { it('returns events when active', () => {
clock = sinon.useFakeTimers(new Date('2024-01-31')); clock = sinon.useFakeTimers(new Date('2024-01-31'));
const events = getRepeatingEvents(); const events = getRepeatingEvents();
expect(events).to.have.length(); expect(events).to.have.length(1);
expect(events[0].key).to.equal('birthday'); expect(events[0].key).to.equal('birthday');
expect(events[0].end).to.be.greaterThan(new Date()); expect(events[0].end).to.be.greaterThan(new Date());
expect(events[0].start).to.be.lessThan(new Date()); expect(events[0].start).to.be.lessThan(new Date());

View File

@@ -72,7 +72,7 @@ describe('food', () => {
}); });
it('sets canDrop for pie if it is pie season', () => { it('sets canDrop for pie if it is pie season', () => {
clock = sinon.useFakeTimers(new Date(2024, 2, 14)); clock = sinon.useFakeTimers(new Date(2024, 2, 15));
const datedContent = require('../../website/common/script/content').default; const datedContent = require('../../website/common/script/content').default;
each(datedContent.food, foodItem => { each(datedContent.food, foodItem => {
if (foodItem.key.indexOf('Pie_') !== -1) { if (foodItem.key.indexOf('Pie_') !== -1) {

View File

@@ -131,7 +131,7 @@ describe('content index', () => {
}); });
it('marks pie as buyable and droppable during pi day', () => { it('marks pie as buyable and droppable during pi day', () => {
clock = sinon.useFakeTimers(new Date('2024-03-14')); clock = sinon.useFakeTimers(new Date('2024-03-15'));
const { food } = content; const { food } = content;
Object.keys(food).forEach(key => { Object.keys(food).forEach(key => {
if (key === 'Saddle') { if (key === 'Saddle') {