backend/test/utils/newSanitizer.utils.test.ts
Fred Boniface 2d2fdbb8db Corrections to unit tests
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-08-01 22:45:08 +01:00

9 lines
328 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);
});
});