-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
139 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,8 +65,8 @@ describe('eventsToNotes.js tests', () => { | |
}) | ||
|
||
describe('smartStringReplace()', () => { | ||
// This function's tests use $Shape<...> to use a subset of large objects without causing errors | ||
const config: $Shape<EventsConfig> = { | ||
// This function's tests use Partial<...> to use a subset of large objects without causing errors | ||
const config: Partial<EventsConfig> = { | ||
calendarNameMappings: [], | ||
locale: 'se-SE', | ||
timeOptions: '', | ||
|
@@ -80,7 +80,8 @@ describe('eventsToNotes.js tests', () => { | |
const endDT = new Date(2021, 0, 23, 22, 0, 0) | ||
const attendeesArray: Array<string> = ['✓ Jonathan Clark', '? James Bond', 'x Martha', '? [email protected]'] | ||
const attendeeNamesArray: Array<string> = ['Jonathan Clark', 'Martha Clark', '[email protected]'] | ||
const event1: $Shape<TCalendarItem> = { | ||
// $FlowFixMe[prop-missing] the Type has functions | ||
const event1: Partial<TCalendarItem> = { | ||
calendar: 'Jonathan', | ||
title: 'title of event1', | ||
url: 'https://example.com/easy', | ||
|
@@ -90,7 +91,8 @@ describe('eventsToNotes.js tests', () => { | |
attendees: attendeesArray, | ||
attendeeNames: attendeeNamesArray, | ||
} // simple case | ||
const event2: $Shape<TCalendarItem> = { | ||
// $FlowFixMe[prop-missing] the Type has functions | ||
const event2: Partial<TCalendarItem> = { | ||
calendar: 'Us', | ||
title: 'title of event2 with <brackets> & more', | ||
url: 'https://example.com/bothersomeURL/example', | ||
|
@@ -100,7 +102,9 @@ describe('eventsToNotes.js tests', () => { | |
attendees: attendeesArray, | ||
attendeeNames: attendeeNamesArray, | ||
} // case with inclusion | ||
// $FlowIgnore[incompatible-call] only sending through what we need | ||
const replacements1 = e.getReplacements(event1, config) | ||
// $FlowIgnore[incompatible-call] only sending through what we need | ||
const replacements2 = e.getReplacements(event2, config) | ||
|
||
test('event 1 format 1 easy', () => { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.