pashto-inflector/src/lib/simplify-phonetics.test.ts

28 lines
692 B
TypeScript
Raw Normal View History

2021-03-16 13:35:41 +00:00
/**
* Copyright (c) 2021 lingdocs.com
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import { simplifyPhonetics } from "./simplify-phonetics";
const toTest: [string, string][] = [
["saRéy", "saRey"],
["Utráa`ee", "Utraaee"],
["be kaar", "bekaar"],
["ma'alóom", "maaloom"],
["lÚtfan", "lUtfan"],
["písta", "pista"],
["săr", "sar"],
["kawúl", "kawul"],
["sắr", "sar"],
["kaar-U-baar", "kaarUbaar"],
2021-03-16 13:35:41 +00:00
];
test("simplifyPhonetics should work", () => {
toTest.forEach((pair) => {
expect(simplifyPhonetics(pair[0])).toEqual(pair[1]);
});
});