application-amicale/utils/__test__/PlanningEventManager.test.js

16 lines
728 B
JavaScript
Raw Normal View History

2020-03-20 22:31:27 +01:00
import React from 'react';
import PlanningEventManager from "../PlanningEventManager";
2020-03-20 22:50:28 +01:00
test('isDescriptionEmpty', () => {
expect(PlanningEventManager.isDescriptionEmpty("")).toBeTrue();
expect(PlanningEventManager.isDescriptionEmpty("<p></p>")).toBeTrue();
expect(PlanningEventManager.isDescriptionEmpty("<p><br></p>")).toBeTrue();
expect(PlanningEventManager.isDescriptionEmpty("<p><br>")).toBeTrue();
expect(PlanningEventManager.isDescriptionEmpty(null)).toBeTrue();
expect(PlanningEventManager.isDescriptionEmpty(undefined)).toBeTrue();
expect(PlanningEventManager.isDescriptionEmpty("coucou")).toBeFalse();
expect(PlanningEventManager.isDescriptionEmpty("<p>coucou</p>")).toBeFalse();
2020-03-20 22:31:27 +01:00
});
2020-03-20 22:50:28 +01:00