@zeedhi/zd-calendar-common 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/types/calendar.d.ts +61 -0
- package/types/index.d.ts +2 -0
- package/types/interfaces.d.ts +65 -0
- package/coverage/clover.xml +0 -132
- package/coverage/coverage-final.json +0 -4
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/calendar.ts.html +0 -691
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +0 -146
- package/coverage/lcov-report/index.ts.html +0 -91
- package/coverage/lcov-report/interfaces.ts.html +0 -406
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov.info +0 -169
- package/jest.config.js +0 -10
- package/tests/unit/calendar.spec.ts +0 -478
- package/tsconfig.eslint.json +0 -10
- package/types/tests/unit/calendar.spec.d.ts +0 -1
|
@@ -1,478 +0,0 @@
|
|
|
1
|
-
import { Calendar } from '../../src';
|
|
2
|
-
|
|
3
|
-
describe('Calendar', () => {
|
|
4
|
-
describe('constructor()', () => {
|
|
5
|
-
it('should create new Calendar with default values', () => {
|
|
6
|
-
const instance = new Calendar({
|
|
7
|
-
name: 'Calendar',
|
|
8
|
-
component: 'Calendar',
|
|
9
|
-
});
|
|
10
|
-
expect(instance.showHeader).toBeTruthy();
|
|
11
|
-
expect(instance.title).toBeUndefined();
|
|
12
|
-
expect(instance.categories).toBeUndefined();
|
|
13
|
-
expect(instance.categoryDays).toBe(1);
|
|
14
|
-
expect(instance.categoryForInvalid).toBeUndefined();
|
|
15
|
-
expect(instance.categoryHideDynamic).toBeFalsy();
|
|
16
|
-
expect(instance.categoryShowAll).toBeFalsy();
|
|
17
|
-
expect(instance.categoryText).toBeUndefined();
|
|
18
|
-
expect(instance.color).toBe('primary');
|
|
19
|
-
expect(instance.dayFormat).toBeNull();
|
|
20
|
-
expect(instance.end).toBeUndefined();
|
|
21
|
-
expect(instance.eventCategory).toBe('category');
|
|
22
|
-
expect(instance.eventColor).toBe('primary');
|
|
23
|
-
expect(instance.eventEnd).toBe('end');
|
|
24
|
-
expect(instance.eventHeight).toBe(20);
|
|
25
|
-
expect(instance.eventMarginBottom).toBe(1);
|
|
26
|
-
expect(instance.eventMore).toBeTruthy();
|
|
27
|
-
expect(instance.eventMoreText).toBe('CALENDAR_MORE');
|
|
28
|
-
expect(instance.eventName).toBe('name');
|
|
29
|
-
expect(instance.eventOverlapMode).toBe('stack');
|
|
30
|
-
expect(instance.eventOverlapThreshold).toBe(60);
|
|
31
|
-
expect(instance.eventStart).toBe('start');
|
|
32
|
-
expect(instance.eventTextColor).toBe('white');
|
|
33
|
-
expect(instance.eventTimed).toBe('timed');
|
|
34
|
-
expect(instance.calendarEvents).toEqual([]);
|
|
35
|
-
expect(instance.firstInterval).toBe(0);
|
|
36
|
-
expect(instance.firstTime).toBe(0);
|
|
37
|
-
expect(instance.hideHeader).toBeFalsy();
|
|
38
|
-
expect(instance.intervalCount).toBe(24);
|
|
39
|
-
expect(instance.intervalFormat).toBeNull();
|
|
40
|
-
expect(instance.intervalHeight).toBe(48);
|
|
41
|
-
expect(instance.intervalMinutes).toBe(60);
|
|
42
|
-
expect(instance.intervalStyle).toBeNull();
|
|
43
|
-
expect(instance.intervalWidth).toBe(60);
|
|
44
|
-
expect(instance.locale).toBe('pt-BR');
|
|
45
|
-
expect(instance.localeFirstDayOfYear).toBe(0);
|
|
46
|
-
expect(instance.maxDays).toBe(7);
|
|
47
|
-
expect(instance.minWeeks).toBe(1);
|
|
48
|
-
expect(instance.monthFormat).toBeNull();
|
|
49
|
-
expect(instance.now).toBeUndefined();
|
|
50
|
-
expect(instance.shortIntervals).toBeTruthy();
|
|
51
|
-
expect(instance.shortMonths).toBeTruthy();
|
|
52
|
-
expect(instance.shortWeekDays).toBeTruthy();
|
|
53
|
-
expect(instance.showIntervalLabel).toBeNull();
|
|
54
|
-
expect(instance.showMonthOnFirst).toBeTruthy();
|
|
55
|
-
expect(instance.showWeek).toBeFalsy();
|
|
56
|
-
expect(instance.start).toBeUndefined();
|
|
57
|
-
expect(instance.type).toBe('month');
|
|
58
|
-
expect(instance.value).toBeUndefined();
|
|
59
|
-
expect(instance.weekdays).toEqual([0, 1, 2, 3, 4, 5, 6]);
|
|
60
|
-
expect(instance.selectTypeData).toBeUndefined();
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
it('should create new Calendar change default values', () => {
|
|
64
|
-
const eventsCalendar = [{
|
|
65
|
-
id: 1,
|
|
66
|
-
name: 'Meeting',
|
|
67
|
-
start: '2022-02-21 12:30:00',
|
|
68
|
-
end: '2022-02-21 13:30:00',
|
|
69
|
-
color: 'red',
|
|
70
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
71
|
-
timed: false,
|
|
72
|
-
category: 'John Smith',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: 2,
|
|
76
|
-
name: 'PTO',
|
|
77
|
-
start: '2022-02-25 14:30:00',
|
|
78
|
-
end: '2022-02-25 16:30:00',
|
|
79
|
-
color: 'blue',
|
|
80
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
81
|
-
timed: false,
|
|
82
|
-
category: 'Tori Walker',
|
|
83
|
-
}];
|
|
84
|
-
|
|
85
|
-
const instance = new Calendar({
|
|
86
|
-
name: 'Calendar',
|
|
87
|
-
component: 'Calendar',
|
|
88
|
-
showHeader: false,
|
|
89
|
-
title: 'Calendar Title',
|
|
90
|
-
categories: "['John Smith', 'Tori Walker']",
|
|
91
|
-
categoryDays: 2,
|
|
92
|
-
categoryForInvalid: 'Marie Doe',
|
|
93
|
-
categoryHideDynamic: true,
|
|
94
|
-
categoryShowAll: true,
|
|
95
|
-
categoryText: 'John Smith',
|
|
96
|
-
color: 'blue',
|
|
97
|
-
dayFormat: () => 'DD',
|
|
98
|
-
end: 4,
|
|
99
|
-
eventCategory: 'day',
|
|
100
|
-
eventColor: 'secondary',
|
|
101
|
-
eventEnd: 'start',
|
|
102
|
-
eventHeight: 25,
|
|
103
|
-
eventMarginBottom: 0,
|
|
104
|
-
eventMore: false,
|
|
105
|
-
eventMoreText: 'mais eventos',
|
|
106
|
-
eventName: 'timed',
|
|
107
|
-
eventOverlapMode: 'column',
|
|
108
|
-
eventOverlapThreshold: 45,
|
|
109
|
-
eventStart: 'end',
|
|
110
|
-
eventTextColor: 'primary',
|
|
111
|
-
eventTimed: 'date',
|
|
112
|
-
calendarEvents: eventsCalendar,
|
|
113
|
-
firstInterval: 1,
|
|
114
|
-
firstTime: 1,
|
|
115
|
-
hideHeader: true,
|
|
116
|
-
intervalCount: 36,
|
|
117
|
-
intervalFormat: () => 'day',
|
|
118
|
-
intervalHeight: 40,
|
|
119
|
-
intervalMinutes: 70,
|
|
120
|
-
intervalStyle: () => { 'black'; },
|
|
121
|
-
intervalWidth: 50,
|
|
122
|
-
locale: 'en-US',
|
|
123
|
-
localeFirstDayOfYear: 1,
|
|
124
|
-
maxDays: 5,
|
|
125
|
-
minWeeks: 2,
|
|
126
|
-
monthFormat: () => 'M',
|
|
127
|
-
now: 'YYYY-MM-DD',
|
|
128
|
-
shortIntervals: false,
|
|
129
|
-
shortMonths: false,
|
|
130
|
-
shortWeekDays: false,
|
|
131
|
-
showIntervalLabel: () => 'day',
|
|
132
|
-
showMonthOnFirst: false,
|
|
133
|
-
showWeek: true,
|
|
134
|
-
start: '2022-02-16',
|
|
135
|
-
type: 'week',
|
|
136
|
-
value: 'YYYY-MM-DD',
|
|
137
|
-
weekdays: [1, 2, 3, 4, 5],
|
|
138
|
-
selectTypeData: {
|
|
139
|
-
date:
|
|
140
|
-
[
|
|
141
|
-
{ name: 'Month', value: 'month' },
|
|
142
|
-
{ name: 'Week', value: 'week' },
|
|
143
|
-
{ name: 'Day', value: 'day' },
|
|
144
|
-
],
|
|
145
|
-
},
|
|
146
|
-
});
|
|
147
|
-
expect(instance.showHeader).toBeFalsy();
|
|
148
|
-
expect(instance.title).toBe('Calendar Title');
|
|
149
|
-
expect(instance.categories).toEqual("['John Smith', 'Tori Walker']");
|
|
150
|
-
expect(instance.categoryDays).toBe(2);
|
|
151
|
-
expect(instance.categoryForInvalid).toBe('Marie Doe');
|
|
152
|
-
expect(instance.categoryHideDynamic).toBeTruthy();
|
|
153
|
-
expect(instance.categoryShowAll).toBeTruthy();
|
|
154
|
-
expect(instance.categoryText).toBe('John Smith');
|
|
155
|
-
expect(instance.color).toBe('blue');
|
|
156
|
-
expect(instance.end).toBe(4);
|
|
157
|
-
expect(instance.eventCategory).toBe('day');
|
|
158
|
-
expect(instance.eventColor).toBe('secondary');
|
|
159
|
-
expect(instance.eventEnd).toBe('start');
|
|
160
|
-
expect(instance.eventHeight).toBe(25);
|
|
161
|
-
expect(instance.eventMarginBottom).toBe(0);
|
|
162
|
-
expect(instance.eventMore).toBeFalsy();
|
|
163
|
-
expect(instance.eventMoreText).toBe('mais eventos');
|
|
164
|
-
expect(instance.eventName).toBe('timed');
|
|
165
|
-
expect(instance.eventOverlapMode).toBe('column');
|
|
166
|
-
expect(instance.eventOverlapThreshold).toBe(45);
|
|
167
|
-
expect(instance.eventStart).toBe('end');
|
|
168
|
-
expect(instance.eventTextColor).toBe('primary');
|
|
169
|
-
expect(instance.eventTimed).toBe('date');
|
|
170
|
-
expect(instance.calendarEvents).toEqual([{
|
|
171
|
-
id: 1,
|
|
172
|
-
name: 'Meeting',
|
|
173
|
-
start: '2022-02-21 12:30:00',
|
|
174
|
-
end: '2022-02-21 13:30:00',
|
|
175
|
-
color: 'red',
|
|
176
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
177
|
-
timed: false,
|
|
178
|
-
category: 'John Smith',
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
id: 2,
|
|
182
|
-
name: 'PTO',
|
|
183
|
-
start: '2022-02-25 14:30:00',
|
|
184
|
-
end: '2022-02-25 16:30:00',
|
|
185
|
-
color: 'blue',
|
|
186
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
187
|
-
timed: false,
|
|
188
|
-
category: 'Tori Walker',
|
|
189
|
-
}]);
|
|
190
|
-
expect(instance.firstInterval).toBe(1);
|
|
191
|
-
expect(instance.firstTime).toBe(1);
|
|
192
|
-
expect(instance.hideHeader).toBeTruthy();
|
|
193
|
-
expect(instance.intervalCount).toBe(36);
|
|
194
|
-
expect(instance.intervalHeight).toBe(40);
|
|
195
|
-
expect(instance.intervalMinutes).toBe(70);
|
|
196
|
-
expect(instance.intervalWidth).toBe(50);
|
|
197
|
-
expect(instance.locale).toBe('en-US');
|
|
198
|
-
expect(instance.localeFirstDayOfYear).toBe(1);
|
|
199
|
-
expect(instance.maxDays).toBe(5);
|
|
200
|
-
expect(instance.minWeeks).toBe(2);
|
|
201
|
-
expect(instance.now).toBe('YYYY-MM-DD');
|
|
202
|
-
expect(instance.shortIntervals).toBeFalsy();
|
|
203
|
-
expect(instance.shortMonths).toBeFalsy();
|
|
204
|
-
expect(instance.shortWeekDays).toBeFalsy();
|
|
205
|
-
expect(instance.showMonthOnFirst).toBeFalsy();
|
|
206
|
-
expect(instance.showWeek).toBeTruthy();
|
|
207
|
-
expect(instance.start).toBe('2022-02-16');
|
|
208
|
-
expect(instance.type).toBe('week');
|
|
209
|
-
expect(instance.value).toBe('YYYY-MM-DD');
|
|
210
|
-
expect(instance.weekdays).toEqual([1, 2, 3, 4, 5]);
|
|
211
|
-
expect(instance.selectTypeData).toEqual({
|
|
212
|
-
date:
|
|
213
|
-
[
|
|
214
|
-
{ name: 'Month', value: 'month' },
|
|
215
|
-
{ name: 'Week', value: 'week' },
|
|
216
|
-
{ name: 'Day', value: 'day' },
|
|
217
|
-
],
|
|
218
|
-
});
|
|
219
|
-
});
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
describe('call events', () => {
|
|
223
|
-
it('should call clearCalendarEvents', () => {
|
|
224
|
-
const eventsCalendar = [{
|
|
225
|
-
id: 1,
|
|
226
|
-
name: 'Meeting',
|
|
227
|
-
start: '2022-02-21 12:30:00',
|
|
228
|
-
end: '2022-02-21 13:30:00',
|
|
229
|
-
color: 'red',
|
|
230
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
231
|
-
timed: false,
|
|
232
|
-
category: 'John Smith',
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
id: 2,
|
|
236
|
-
name: 'PTO',
|
|
237
|
-
start: '2022-02-25 14:30:00',
|
|
238
|
-
end: '2022-02-25 16:30:00',
|
|
239
|
-
color: 'blue',
|
|
240
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
241
|
-
timed: false,
|
|
242
|
-
category: 'Tori Walker',
|
|
243
|
-
}];
|
|
244
|
-
|
|
245
|
-
const instance = new Calendar({
|
|
246
|
-
name: 'Calendar',
|
|
247
|
-
component: 'Calendar',
|
|
248
|
-
calendarEvents: eventsCalendar,
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
instance.clearCalendarEvents();
|
|
252
|
-
expect(instance.calendarEvents).toEqual([]);
|
|
253
|
-
});
|
|
254
|
-
|
|
255
|
-
it('should call addCalendarEvents', () => {
|
|
256
|
-
const events1 = [{
|
|
257
|
-
id: 1,
|
|
258
|
-
name: 'Meeting',
|
|
259
|
-
start: '2022-02-21 12:30:00',
|
|
260
|
-
end: '2022-02-21 13:30:00',
|
|
261
|
-
color: 'red',
|
|
262
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
263
|
-
timed: false,
|
|
264
|
-
category: 'John Smith',
|
|
265
|
-
}];
|
|
266
|
-
const events2 = [{
|
|
267
|
-
id: 2,
|
|
268
|
-
name: 'Meeting',
|
|
269
|
-
start: '2022-02-22 12:30:00',
|
|
270
|
-
end: '2022-02-22 13:30:00',
|
|
271
|
-
color: 'blue',
|
|
272
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
273
|
-
timed: false,
|
|
274
|
-
category: 'John Smith',
|
|
275
|
-
}];
|
|
276
|
-
|
|
277
|
-
const instance = new Calendar({
|
|
278
|
-
name: 'Calendar',
|
|
279
|
-
component: 'Calendar',
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
instance.addCalendarEvents(events1);
|
|
283
|
-
expect(instance.calendarEvents).toEqual([{
|
|
284
|
-
id: 1,
|
|
285
|
-
name: 'Meeting',
|
|
286
|
-
start: '2022-02-21 12:30:00',
|
|
287
|
-
end: '2022-02-21 13:30:00',
|
|
288
|
-
color: 'red',
|
|
289
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
290
|
-
timed: false,
|
|
291
|
-
category: 'John Smith',
|
|
292
|
-
}]);
|
|
293
|
-
|
|
294
|
-
instance.addCalendarEvents(events2);
|
|
295
|
-
expect(instance.calendarEvents).toEqual([{
|
|
296
|
-
id: 1,
|
|
297
|
-
name: 'Meeting',
|
|
298
|
-
start: '2022-02-21 12:30:00',
|
|
299
|
-
end: '2022-02-21 13:30:00',
|
|
300
|
-
color: 'red',
|
|
301
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
302
|
-
timed: false,
|
|
303
|
-
category: 'John Smith',
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
id: 2,
|
|
307
|
-
name: 'Meeting',
|
|
308
|
-
start: '2022-02-22 12:30:00',
|
|
309
|
-
end: '2022-02-22 13:30:00',
|
|
310
|
-
color: 'blue',
|
|
311
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
312
|
-
timed: false,
|
|
313
|
-
category: 'John Smith',
|
|
314
|
-
}]);
|
|
315
|
-
});
|
|
316
|
-
|
|
317
|
-
it('should call updateCalendarEvent', () => {
|
|
318
|
-
const event1 = [{
|
|
319
|
-
id: 122,
|
|
320
|
-
name: 'Meeting',
|
|
321
|
-
start: '2022-02-21 12:30:00',
|
|
322
|
-
end: '2022-02-21 13:30:00',
|
|
323
|
-
color: 'blue',
|
|
324
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
325
|
-
timed: false,
|
|
326
|
-
category: 'John Smith',
|
|
327
|
-
}];
|
|
328
|
-
|
|
329
|
-
const eventsCalendar = [{
|
|
330
|
-
id: 122,
|
|
331
|
-
name: 'Meeting',
|
|
332
|
-
start: '2022-02-21 12:30:00',
|
|
333
|
-
end: '2022-02-21 13:30:00',
|
|
334
|
-
color: 'red',
|
|
335
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
336
|
-
timed: false,
|
|
337
|
-
category: 'John Smith',
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
id: 2,
|
|
341
|
-
name: 'PTO',
|
|
342
|
-
start: '2022-02-25 14:30:00',
|
|
343
|
-
end: '2022-02-25 16:30:00',
|
|
344
|
-
color: 'blue',
|
|
345
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
346
|
-
timed: false,
|
|
347
|
-
category: 'Tori Walker',
|
|
348
|
-
}];
|
|
349
|
-
|
|
350
|
-
const instance = new Calendar({
|
|
351
|
-
name: 'Calendar',
|
|
352
|
-
component: 'Calendar',
|
|
353
|
-
});
|
|
354
|
-
|
|
355
|
-
instance.updateCalendarEvent(event1);
|
|
356
|
-
expect(instance.calendarEvents).toEqual([
|
|
357
|
-
{
|
|
358
|
-
id: 122,
|
|
359
|
-
name: 'Meeting',
|
|
360
|
-
start: '2022-02-21 12:30:00',
|
|
361
|
-
end: '2022-02-21 13:30:00',
|
|
362
|
-
color: 'blue',
|
|
363
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
364
|
-
timed: false,
|
|
365
|
-
category: 'John Smith',
|
|
366
|
-
}]);
|
|
367
|
-
|
|
368
|
-
instance.updateCalendarEvent(eventsCalendar);
|
|
369
|
-
|
|
370
|
-
expect(instance.calendarEvents).toEqual([
|
|
371
|
-
{
|
|
372
|
-
id: 122,
|
|
373
|
-
name: 'Meeting',
|
|
374
|
-
start: '2022-02-21 12:30:00',
|
|
375
|
-
end: '2022-02-21 13:30:00',
|
|
376
|
-
color: 'red',
|
|
377
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
378
|
-
timed: false,
|
|
379
|
-
category: 'John Smith',
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
id: 2,
|
|
383
|
-
name: 'PTO',
|
|
384
|
-
start: '2022-02-25 14:30:00',
|
|
385
|
-
end: '2022-02-25 16:30:00',
|
|
386
|
-
color: 'blue',
|
|
387
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
388
|
-
timed: false,
|
|
389
|
-
category: 'Tori Walker',
|
|
390
|
-
}]);
|
|
391
|
-
});
|
|
392
|
-
|
|
393
|
-
it('should call removeCalendarEvents', () => {
|
|
394
|
-
const eventsCalendar = [{
|
|
395
|
-
id: 1,
|
|
396
|
-
name: 'Meeting',
|
|
397
|
-
start: '2022-02-21 12:30:00',
|
|
398
|
-
end: '2022-02-21 13:30:00',
|
|
399
|
-
color: 'red',
|
|
400
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
401
|
-
timed: false,
|
|
402
|
-
category: 'John Smith',
|
|
403
|
-
},
|
|
404
|
-
{
|
|
405
|
-
id: 2,
|
|
406
|
-
name: 'PTO',
|
|
407
|
-
start: '2022-02-25 14:30:00',
|
|
408
|
-
end: '2022-02-25 16:30:00',
|
|
409
|
-
color: 'blue',
|
|
410
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
411
|
-
timed: false,
|
|
412
|
-
category: 'Tori Walker',
|
|
413
|
-
}];
|
|
414
|
-
|
|
415
|
-
const instance = new Calendar({
|
|
416
|
-
name: 'Calendar',
|
|
417
|
-
component: 'Calendar',
|
|
418
|
-
calendarEvents: eventsCalendar,
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
instance.removeCalendarEvents([{
|
|
422
|
-
id: 1657,
|
|
423
|
-
name: 'Meeting',
|
|
424
|
-
start: '2022-02-21 12:30:00',
|
|
425
|
-
end: '2022-02-21 13:30:00',
|
|
426
|
-
color: 'red',
|
|
427
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
428
|
-
timed: false,
|
|
429
|
-
category: 'John Smith',
|
|
430
|
-
}]);
|
|
431
|
-
|
|
432
|
-
expect(instance.calendarEvents).toEqual([
|
|
433
|
-
{
|
|
434
|
-
id: 1,
|
|
435
|
-
name: 'Meeting',
|
|
436
|
-
start: '2022-02-21 12:30:00',
|
|
437
|
-
end: '2022-02-21 13:30:00',
|
|
438
|
-
color: 'red',
|
|
439
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
440
|
-
timed: false,
|
|
441
|
-
category: 'John Smith',
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
id: 2,
|
|
445
|
-
name: 'PTO',
|
|
446
|
-
start: '2022-02-25 14:30:00',
|
|
447
|
-
end: '2022-02-25 16:30:00',
|
|
448
|
-
color: 'blue',
|
|
449
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
450
|
-
timed: false,
|
|
451
|
-
category: 'Tori Walker',
|
|
452
|
-
}]);
|
|
453
|
-
|
|
454
|
-
instance.removeCalendarEvents([{
|
|
455
|
-
id: 1,
|
|
456
|
-
name: 'Meeting',
|
|
457
|
-
start: '2022-02-21 12:30:00',
|
|
458
|
-
end: '2022-02-21 13:30:00',
|
|
459
|
-
color: 'red',
|
|
460
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
461
|
-
timed: false,
|
|
462
|
-
category: 'John Smith',
|
|
463
|
-
}]);
|
|
464
|
-
|
|
465
|
-
expect(instance.calendarEvents).toEqual([
|
|
466
|
-
{
|
|
467
|
-
id: 2,
|
|
468
|
-
name: 'PTO',
|
|
469
|
-
start: '2022-02-25 14:30:00',
|
|
470
|
-
end: '2022-02-25 16:30:00',
|
|
471
|
-
color: 'blue',
|
|
472
|
-
description: 'Lorem ipsum dolor sit amet',
|
|
473
|
-
timed: false,
|
|
474
|
-
category: 'Tori Walker',
|
|
475
|
-
}]);
|
|
476
|
-
});
|
|
477
|
-
});
|
|
478
|
-
});
|
package/tsconfig.eslint.json
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|