9 lines
328 B
TypeScript
9 lines
328 B
TypeScript
import { removeNewlineAndPTag } from "../../src/utils/sanitizer.utils";
|
|
|
|
describe('sanitizer', () => {
|
|
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);
|
|
});
|
|
}); |