Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions Test/public/convertMeetingMembersToMarkdown.test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ function Test_ConvertMeetingMembersToMarkdown_SingleCompany {
$input = "Alice Johnson <[email protected]>, `"Bob Smith (AlphaTech)`" <[email protected]>"

# Act
$result = Convert-MeetingMembersToMarkdown -MeetingMembers $input
$result = Convert-NotesMeetingMembersToMarkdown -MeetingMembers $input

# Assert
$expected = @"
- Alphatech
- Alphatech (2)
- Alice Johnson <[email protected]>
- "Bob Smith (AlphaTech)" <[email protected]>
"@
Expand All @@ -21,16 +21,16 @@ function Test_ConvertMeetingMembersToMarkdown_MultipleCompanies {
$input = "Alice Johnson <[email protected]>, `"Bob Smith (AlphaTech)`" <[email protected]>, Alice Johnson <[email protected]>, `"Charlie Brown, David`" <[email protected]>, `"Emma Wilson, Frank`" <[email protected]>, `"Grace Lee, Henry`" <[email protected]>"

# Act
$result = Convert-MeetingMembersToMarkdown -MeetingMembers $input
$result = Convert-NotesMeetingMembersToMarkdown -MeetingMembers $input

# Assert
$expected = @"
- Alphatech
- Alphatech (2)
- Alice Johnson <[email protected]>
- "Bob Smith (AlphaTech)" <[email protected]>
- Betasoft
- Betasoft (1)
- Alice Johnson <[email protected]>
- Gammatech
- Gammatech (3)
- "Charlie Brown, David" <[email protected]>
- "Emma Wilson, Frank" <[email protected]>
- "Grace Lee, Henry" <[email protected]>
Expand All @@ -44,14 +44,14 @@ function Test_ConvertMeetingMembersToMarkdown_DuplicateMemberDifferentCompanies
$input = "Alice Johnson <[email protected]>, Alice Johnson <[email protected]>"

# Act
$result = Convert-MeetingMembersToMarkdown -MeetingMembers $input
$result = Convert-NotesMeetingMembersToMarkdown -MeetingMembers $input

# Assert
# Same person with different emails should appear in both company groups
$expected = @"
- Alphatech
- Alphatech (1)
- Alice Johnson <[email protected]>
- Betasoft
- Betasoft (1)
- Alice Johnson <[email protected]>
"@
Assert-AreEqual -Expected $expected -Presented $result -Comment "Same person with different emails should appear in both companies"
Expand All @@ -63,14 +63,14 @@ function Test_ConvertMeetingMembersToMarkdown_SpecialCharactersInName {
$input = "`"Bob Smith (AlphaTech)`" <[email protected]>, `"Charlie Brown, David`" <[email protected]>"

# Act
$result = Convert-MeetingMembersToMarkdown -MeetingMembers $input
$result = Convert-NotesMeetingMembersToMarkdown -MeetingMembers $input

# Assert
# Names with special characters (parentheses, commas) should be preserved
$expected = @"
- Alphatech
- Alphatech (1)
- "Bob Smith (AlphaTech)" <[email protected]>
- Gammatech
- Gammatech (1)
- "Charlie Brown, David" <[email protected]>
"@
Assert-AreEqual -Expected $expected -Presented $result -Comment "Names with special characters should be preserved"
Expand All @@ -82,7 +82,7 @@ function Test_ConvertMeetingMembersToMarkdown_EmptyInput {
$input = ""

# Act
$result = Convert-MeetingMembersToMarkdown -MeetingMembers $input
$result = Convert-NotesMeetingMembersToMarkdown -MeetingMembers $input

# Assert
Assert-AreEqual -Expected "" -Presented $result -Comment "Empty input should return empty string"
Expand All @@ -94,7 +94,7 @@ function Test_ConvertMeetingMembersToMarkdown_WhitespaceOnlyInput {
$input = " "

# Act
$result = Convert-MeetingMembersToMarkdown -MeetingMembers $input
$result = Convert-NotesMeetingMembersToMarkdown -MeetingMembers $input

# Assert
Assert-AreEqual -Expected "" -Presented $result -Comment "Whitespace-only input should return empty string"
Expand All @@ -106,11 +106,11 @@ function Test_ConvertMeetingMembersToMarkdown_SingleMember {
$input = "John Doe <[email protected]>"

# Act
$result = Convert-MeetingMembersToMarkdown -MeetingMembers $input
$result = Convert-NotesMeetingMembersToMarkdown -MeetingMembers $input

# Assert
$expected = @"
- Example
- Example (1)
- John Doe <[email protected]>
"@
Assert-AreEqual -Expected $expected -Presented $result -Comment "Single member should work correctly"
Expand All @@ -122,16 +122,16 @@ function Test_ConvertMeetingsMembersToMarkdown_Big_sample{
"Alice Anderson" <[email protected]>, "Amy Adams (She/Her)" <[email protected]>, "Bob Brown" <[email protected]>, "Charlie Chen" <[email protected]>, [email protected], "David Dennis" <[email protected]>, "Emma Evans, Eric" <[email protected]>, [email protected], "Frank Fields, Fiona" <[email protected]>, [email protected], [email protected], "Grace (AlphaTech) Garcia" <[email protected]>, "Henry Harris" <[email protected]>, "Iris Ingram" <[email protected]>, "Jack Johnson" <[email protected]>, "James Jackson" <[email protected]>, "Jennifer Jones" <[email protected]>, "Kevin Kim" <[email protected]>, "Kyle Knight" <[email protected]>, [email protected], "Laura Lewis" <[email protected]>, "Mark Martinez" <[email protected]>
"@

$result = Convert-MeetingMembersToMarkdown -MeetingMembers $imput
$result = Convert-NotesMeetingMembersToMarkdown -MeetingMembers $imput

Assert-AreEqual -Presented $result -Expected @"
- Alphatech
- Alphatech (5)
- "Grace (AlphaTech) Garcia" <[email protected]>
- "Henry Harris" <[email protected]>
- "Kevin Kim" <[email protected]>
- "Laura Lewis" <[email protected]>
- "Mark Martinez" <[email protected]>
- Betasoft
- Betasoft (9)
- "Amy Adams (She/Her)" <[email protected]>
- "Bob Brown" <[email protected]>
- "Charlie Chen" <[email protected]>
Expand All @@ -141,7 +141,7 @@ function Test_ConvertMeetingsMembersToMarkdown_Big_sample{
- "James Jackson" <[email protected]>
- "Jennifer Jones" <[email protected]>
- "Kyle Knight" <[email protected]>
- Deltalab
- Deltalab (3)
- "Alice Anderson" <[email protected]>
- "Emma Evans, Eric" <[email protected]>
- "Frank Fields, Fiona" <[email protected]>
Expand Down
5 changes: 3 additions & 2 deletions private/parseMemberEmail.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ function groupMembersByCompany {
$result = @()

foreach ($group in $grouped) {
# Add company header
$result += "- $($group.Name)"
# Add company header with member count
$memberCount = $group.Group.Count
$result += "- $($group.Name) ($memberCount)"

# Add members with 4-space indentation
foreach ($member in $group.Group) {
Expand Down
4 changes: 2 additions & 2 deletions public/convertMeetingMembersToMarkdown.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

function Convert-MeetingMembersToMarkdown {
function Convert-NotesMeetingMembersToMarkdown {
[CmdletBinding()]
param(
[Parameter(Position = 0, ValueFromPipeline)][string]$MeetingMembers
Expand Down Expand Up @@ -55,4 +55,4 @@ function Convert-MeetingMembersToMarkdown {

return $result
}
} Export-ModuleMember -Function 'Convert-MeetingMembersToMarkdown'
} Export-ModuleMember -Function 'Convert-NotesMeetingMembersToMarkdown'
Loading