mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
update tests
This commit is contained in:
committed by
Phillip Thelen
parent
88a1cfb689
commit
e559fb7e4b
@@ -18,7 +18,7 @@ describe('events', () => {
|
||||
it('returns events when active', () => {
|
||||
clock = sinon.useFakeTimers(new Date('2024-01-31'));
|
||||
const events = getRepeatingEvents();
|
||||
expect(events).to.have.length();
|
||||
expect(events).to.have.length(1);
|
||||
expect(events[0].key).to.equal('birthday');
|
||||
expect(events[0].end).to.be.greaterThan(new Date());
|
||||
expect(events[0].start).to.be.lessThan(new Date());
|
||||
|
||||
@@ -72,7 +72,7 @@ describe('food', () => {
|
||||
});
|
||||
|
||||
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;
|
||||
each(datedContent.food, foodItem => {
|
||||
if (foodItem.key.indexOf('Pie_') !== -1) {
|
||||
|
||||
@@ -131,7 +131,7 @@ describe('content index', () => {
|
||||
});
|
||||
|
||||
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;
|
||||
Object.keys(food).forEach(key => {
|
||||
if (key === 'Saddle') {
|
||||
|
||||
Reference in New Issue
Block a user