2023-08-01 22:45:08 +01:00
|
|
|
import { removeNewlineAndPTag } from "../../src/utils/newSanitizer";
|
|
|
|
|
2023-08-26 00:38:26 +01:00
|
|
|
describe("newSanitizer", () => {
|
|
|
|
test("Should remove /\n and <p>/</p> elements", () => {
|
2023-08-01 22:45:08 +01:00
|
|
|
const input = "\n<p>This is a string</p>";
|
2023-08-26 00:38:26 +01:00
|
|
|
const expectedOutput = "This is a string";
|
2023-08-01 22:45:08 +01:00
|
|
|
expect(removeNewlineAndPTag(input)).toEqual(expectedOutput);
|
|
|
|
});
|
2023-08-26 00:38:26 +01:00
|
|
|
});
|