mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2026-01-18 19:01:29 +00:00
Correct linting and tests.
This commit is contained in:
parent
435e320417
commit
51838d398a
@ -188,16 +188,22 @@ describe('Filter Posts', () => {
|
||||
variables: { filter: { postType_in: ['Event'] }, orderBy: ['eventStart_asc'] },
|
||||
})
|
||||
expect(result).toHaveLength(2)
|
||||
expect(result).toEqual([
|
||||
expect.objectContaining({
|
||||
id: 'e2',
|
||||
eventStart: new Date(now.getFullYear(), now.getMonth(), now.getDate() + 1).toISOString(),
|
||||
}),
|
||||
expect.objectContaining({
|
||||
id: 'e1',
|
||||
eventStart: new Date(now.getFullYear(), now.getMonth() + 1).toISOString(),
|
||||
}),
|
||||
])
|
||||
expect(result).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: 'e2',
|
||||
eventStart: new Date(
|
||||
now.getFullYear(),
|
||||
now.getMonth(),
|
||||
now.getDate() + 1,
|
||||
).toISOString(),
|
||||
}),
|
||||
expect.objectContaining({
|
||||
id: 'e1',
|
||||
eventStart: new Date(now.getFullYear(), now.getMonth() + 1).toISOString(),
|
||||
}),
|
||||
]),
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
@ -219,12 +225,14 @@ describe('Filter Posts', () => {
|
||||
},
|
||||
})
|
||||
expect(result).toHaveLength(1)
|
||||
expect(result).toEqual([
|
||||
expect.objectContaining({
|
||||
id: 'e1',
|
||||
eventStart: new Date(now.getFullYear(), now.getMonth() + 1).toISOString(),
|
||||
}),
|
||||
])
|
||||
expect(result).toEqual(
|
||||
expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
id: 'e1',
|
||||
eventStart: new Date(now.getFullYear(), now.getMonth() + 1).toISOString(),
|
||||
}),
|
||||
]),
|
||||
)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user