summaryrefslogtreecommitdiff
path: root/src/language.test.ts
diff options
context:
space:
mode:
authorsanine <sanine.not@pm.me>2024-05-06 13:55:32 -0500
committersanine <sanine.not@pm.me>2024-05-06 13:55:32 -0500
commit345b7daf4509ac89f70790c71cb2cba9b7a4f300 (patch)
treec3a26c74a0ecfe826f965cad7bdbfe62b65d2c80 /src/language.test.ts
parentdc78c78d1aec79e532badeedd782186c4742e3a3 (diff)
add basic vowel features
Diffstat (limited to 'src/language.test.ts')
-rw-r--r--src/language.test.ts33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/language.test.ts b/src/language.test.ts
new file mode 100644
index 0000000..e9845a1
--- /dev/null
+++ b/src/language.test.ts
@@ -0,0 +1,33 @@
+import * as lang from './language';
+
+test('correctly output basic vowels', () => {
+ expect(lang.vowelFeaturesToIpa({
+ height: lang.VowelHeight.Close,
+ depth: lang.VowelDepth.Front,
+ round: false,
+ long: false,
+ nasal: false,
+ })).toBe('i');
+ expect(lang.vowelFeaturesToIpa({
+ height: lang.VowelHeight.Mid,
+ depth: lang.VowelDepth.Central,
+ round: false,
+ long: false,
+ nasal: false,
+ })).toBe('ə');
+ expect(lang.vowelFeaturesToIpa({
+ height: lang.VowelHeight.Open,
+ depth: lang.VowelDepth.Back,
+ round: true,
+ long: false,
+ nasal: true,
+ })).toBe('ɒ̃');
+ expect(lang.vowelFeaturesToIpa({
+ height: lang.VowelHeight.CloseMid,
+ depth: lang.VowelDepth.Front,
+ round: false,
+ long: true,
+ nasal: false,
+ })).toBe('eː');
+
+});