Skip to content

Commit

Permalink
test: fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
johannesjo committed Jan 26, 2024
1 parent 5f1805a commit 87a2bcd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ describe('isCalenderEventDue()', () => {
it('should be true if event starts now', () => {
expect(
isCalenderEventDue(
{ id: 'CID', start: 5, title: 'T', duration: 1 },
{ id: 'CID', calProviderId: 'PR', start: 5, title: 'T', duration: 1 },
{
showBannerBeforeThreshold: 0,
} as CalendarProvider,
Expand All @@ -18,7 +18,7 @@ describe('isCalenderEventDue()', () => {
it('should be true if event starts within provider threshold', () => {
expect(
isCalenderEventDue(
{ id: 'CID', start: 5, title: 'T', duration: 1 },
{ id: 'CID', calProviderId: 'PR', start: 5, title: 'T', duration: 1 },
{
showBannerBeforeThreshold: 2,
} as CalendarProvider,
Expand All @@ -31,7 +31,7 @@ describe('isCalenderEventDue()', () => {
it('should be false if event starts outside the provider threshold', () => {
expect(
isCalenderEventDue(
{ id: 'CID', start: 5, title: 'T', duration: 1 },
{ id: 'CID', calProviderId: 'PR', start: 5, title: 'T', duration: 1 },
{
showBannerBeforeThreshold: 2,
} as CalendarProvider,
Expand All @@ -44,7 +44,7 @@ describe('isCalenderEventDue()', () => {
it('should be false if event has NOT started yet and there is NO provider threshold', () => {
expect(
isCalenderEventDue(
{ id: 'CID', start: 5, title: 'T', duration: 1 },
{ id: 'CID', calProviderId: 'PR', start: 5, title: 'T', duration: 1 },
{
showBannerBeforeThreshold: null,
} as CalendarProvider,
Expand All @@ -57,7 +57,7 @@ describe('isCalenderEventDue()', () => {
it('should be if false if event was skipped', () => {
expect(
isCalenderEventDue(
{ id: 'CID', start: 5, title: 'T', duration: 1 },
{ id: 'CID', calProviderId: 'PR', start: 5, title: 'T', duration: 1 },
{
showBannerBeforeThreshold: 0,
} as CalendarProvider,
Expand All @@ -70,7 +70,7 @@ describe('isCalenderEventDue()', () => {
it('should be if false if event is in the far future', () => {
expect(
isCalenderEventDue(
{ id: 'CID', start: 6, title: 'T', duration: 88 },
{ id: 'CID', calProviderId: 'PR', start: 6, title: 'T', duration: 88 },
{
showBannerBeforeThreshold: 0,
} as CalendarProvider,
Expand Down
1 change: 1 addition & 0 deletions src/app/features/tasks/short-syntax.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const TASK: TaskCopy = {
attachments: [],

issueId: null,
issueProviderId: null,
issuePoints: null,
issueType: null,
issueAttachmentNr: null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1024,6 +1024,7 @@ describe('createBlockerBlocks()', () => {
items: [
{
id: 'EventId',
calProviderId: 'PR',
start: getDateTimeFromClockString('10:00', 24 * 60 * 60 * 1000),
title: 'XXX',
icon: 'aaa',
Expand Down Expand Up @@ -1068,6 +1069,7 @@ describe('createBlockerBlocks()', () => {
entries: [
{
data: {
calProviderId: 'PR',
duration: 3600000,
icon: '',
start: 118800000,
Expand Down

0 comments on commit 87a2bcd

Please sign in to comment.