ntms
Version:
A dead simple way to add i18n to your Next.js app using the Notion API and Deepl
38 lines (35 loc) • 734 B
text/typescript
import { RichText } from "../types";
import { toPlainText } from "../utils";
const testRichText = [
{
type: "text",
plain_text: "NTMS",
annotations: {
bold: false,
italic: false,
strikethrough: false,
underline: false,
code: false,
color: "default",
},
href: null,
},
{
type: "text",
plain_text: " IS AWESOME",
annotations: {
bold: false,
italic: false,
strikethrough: false,
underline: true,
code: false,
color: "default",
},
href: null,
},
] as RichText[];
describe("To plain text", () => {
it("Should return a plain text", () => {
expect(toPlainText(testRichText)).toEqual("NTMS IS AWESOME");
});
});