This commit is contained in:
adueck 2022-09-23 14:23:31 +04:00
parent 2468c4e98b
commit cc83c1318e
2 changed files with 2 additions and 8 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@lingdocs/pashto-inflector",
"version": "3.9.8",
"version": "4.0.0",
"author": "lingdocs.com",
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
"homepage": "https://verbs.lingdocs.com",

View File

@ -1,4 +1,4 @@
import { psJSXMap, JSXMap } from "./jsx-map";
import { psJSXMap } from "./jsx-map";
test("psJSXMap should work with f as a target", () => {
const input = { p: <>زه کور ته <strong>ځم</strong></>, f: <>zu kor ta <strong>dzum</strong></> };
@ -18,9 +18,3 @@ test("psJSXMap will error if given an uneven/unbalanced pair of JSX Elements", (
psJSXMap(input, "p", (ps) => ps.p.replace(/ځ/g, "ز"));
}).toThrow("error mapping out PsJSX - unbalanced trees");
});
test("plain JSX map util", () => {
const input = <>this <em>will be <strong>transformed</strong></em> <span>nicely</span></>;
const output = JSXMap(input, (s) => s.toUpperCase());
expect(output).toEqual(<>THIS <em>WILL BE <strong>TRANSFORMED</strong></em> <span>NICELY</span></>);
});