Skip to content

Commit

Permalink
Update tests for fixTrackSuffix function
Browse files Browse the repository at this point in the history
Remove redundand test cases.
Update case description.
  • Loading branch information
alexesprit committed Nov 21, 2020
1 parent 9492e03 commit 25b6f12
Showing 1 changed file with 22 additions and 62 deletions.
84 changes: 22 additions & 62 deletions test/function/fix-track-suffix.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,88 +14,48 @@ testFilterFunction(fixTrackSuffix, [
expectedValue: 'Track Title (Remix)',
},
{
description: 'should replace invalid suffix',
description: 'should replace invalid "Remix" suffix',
funcParameter: 'Track Title - Artist Remix',
expectedValue: 'Track Title (Artist Remix)',
},
{
description: 'should replace invalid suffix',
description: 'should replace invalid "X Remix" suffix',
funcParameter: 'Track Title - Remix',
expectedValue: 'Track Title (Remix)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Remix',
expectedValue: 'Track A (Remix)',
description: 'should replace invalid "X Dub" suffix',
funcParameter: 'Track Title - Group X dub',
expectedValue: 'Track Title (Group X dub)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Group X dub',
expectedValue: 'Track A (Group X dub)',
description: 'should replace invalid "X Edit" suffix',
funcParameter: 'Track Title - Group X edit',
expectedValue: 'Track Title (Group X edit)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Group X edit',
expectedValue: 'Track A (Group X edit)',
description: 'should replace invalid "X Mix" suffix',
funcParameter: 'Track Title - Group X mix',
expectedValue: 'Track Title (Group X mix)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Group X mix',
expectedValue: 'Track A (Group X mix)',
description: 'should replace invalid multifle suffixes',
funcParameter: 'Track Title - Group X Remix Edit',
expectedValue: 'Track Title (Group X Remix Edit)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Group X Remix Edit',
expectedValue: 'Track A (Group X Remix Edit)',
description: 'should replace invalid "VIP" suffix',
funcParameter: 'Track Title - VIP',
expectedValue: 'Track Title (VIP)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - VIP',
expectedValue: 'Track A (VIP)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Radio Edit',
expectedValue: 'Track A (Radio Edit)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - X Radio Edit',
expectedValue: 'Track A (X Radio Edit)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Short Version',
expectedValue: 'Track A (Short Version)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Original Mix',
expectedValue: 'Track A (Original Mix)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Radio Version',
expectedValue: 'Track A (Radio Version)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Group X Radio Mix',
expectedValue: 'Track A (Group X Radio Mix)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Continuous Mix',
expectedValue: 'Track A (Continuous Mix)',
},
{
description: 'should replace invalid suffix',
funcParameter: 'Track A - Factoria Vocal Mix',
expectedValue: 'Track A (Factoria Vocal Mix)',
description: 'should replace invalid "X Version" suffix',
funcParameter: 'Track Title - Short Version',
expectedValue: 'Track Title (Short Version)',
},
{
description: 'should remove "- Original" sufix',
funcParameter: 'Track A - Original',
expectedValue: 'Track A ',
funcParameter: 'Track Title - Original',
expectedValue: 'Track Title ',
},
]);

0 comments on commit 25b6f12

Please sign in to comment.