backend/test/utils/newSanitizer.utils.test.ts
Fred Boniface 31f104f51b Run prettier
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-08-26 00:38:26 +01:00

10 lines
330 B
TypeScript

import { removeNewlineAndPTag } from "../../src/utils/newSanitizer";
describe("newSanitizer", () => {
test("Should remove /\n and <p>/</p> elements", () => {
const input = "\n<p>This is a string</p>";
const expectedOutput = "This is a string";
expect(removeNewlineAndPTag(input)).toEqual(expectedOutput);
});
});