-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename fluent to fleeting vowels
- Loading branch information
Showing
5 changed files
with
57 additions
and
57 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { inferFleetingVowel, markFleetingVowel } from './fleetingVowels'; | ||
|
||
describe('fleetingVowels', () => { | ||
describe('markFleetingVowel', () => { | ||
it('marks the fleeting vowel in the word', () => { | ||
expect(markFleetingVowel('pes', 'psa')).toBe('p(e)s'); | ||
expect(markFleetingVowel('son', 'sna')).toBe('s(o)n'); | ||
}); | ||
|
||
it('returns the same word when there is no fleeting vowel', () => { | ||
expect(markFleetingVowel('mama', 'mama')).toBe('mama'); | ||
}); | ||
|
||
it('marks the fleeting vowel when it includes a diacritic', () => { | ||
expect(markFleetingVowel('pènj', 'pnja')).toBe('p(e)nj'); | ||
expect(markFleetingVowel('sòn', 'sna')).toBe('s(o)n'); | ||
}); | ||
}); | ||
|
||
describe('inferFleetingVowel', () => { | ||
it('infers the fleeting vowel in the word', () => { | ||
expect(inferFleetingVowel('pės')).toBe('p(e)s'); | ||
expect(inferFleetingVowel('pèsȯk')).toBe('pès(o)k'); | ||
expect(inferFleetingVowel('sȯn')).toBe('s(o)n'); | ||
expect(inferFleetingVowel('dėnj')).toBe('d(e)nj'); | ||
expect(inferFleetingVowel('orėl')).toBe('or(e)l'); | ||
}); | ||
|
||
it('infers the fleeting vowel in complex words', () => { | ||
expect(inferFleetingVowel('pėsȯk, kotȯk i orėl')).toBe( | ||
'pės(o)k, kot(o)k i or(e)l', | ||
); | ||
}); | ||
|
||
it('does not infer incorrect fleeting vowels in the word', () => { | ||
expect(inferFleetingVowel('pėj')).toBe('pėj'); | ||
expect(inferFleetingVowel('dvėri')).toBe('dvėri'); | ||
expect(inferFleetingVowel('dȯžď')).toBe('dȯžď'); | ||
}); | ||
}); | ||
}); |
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 was deleted.
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export * from './stripDiacritics'; | ||
export * from './fluentVowels'; | ||
export * from './fleetingVowels'; |
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