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();
|
2020-03-21 11:24:30 +01:00
|
|
|
expect(PlanningEventManager.isDescriptionEmpty(" ")).toBeTrue();
|
2020-03-20 22:50:28 +01:00
|
|
|
expect(PlanningEventManager.isDescriptionEmpty("<p></p>")).toBeTrue();
|
2020-03-21 11:24:30 +01:00
|
|
|
expect(PlanningEventManager.isDescriptionEmpty("<p> </p>")).toBeTrue();
|
2020-03-20 22:50:28 +01:00
|
|
|
expect(PlanningEventManager.isDescriptionEmpty("<p><br></p>")).toBeTrue();
|
2020-03-21 11:24:30 +01:00
|
|
|
expect(PlanningEventManager.isDescriptionEmpty("<p><br></p><p><br></p>")).toBeTrue();
|
|
|
|
expect(PlanningEventManager.isDescriptionEmpty("<p><br><br><br></p>")).toBeTrue();
|
2020-03-20 22:50:28 +01:00
|
|
|
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
|
|
|
|