Bump local twake-mui lockfile to 1.1.8.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
extractVideoConferenceFromDescription,
|
||||
generateMeetingId,
|
||||
generateMeetingLink,
|
||||
removeVideoConferenceFromDescription,
|
||||
} from "../videoConferenceUtils";
|
||||
|
||||
// Mock window object for Node.js environment
|
||||
@@ -82,4 +83,39 @@ describe("videoConferenceUtils", () => {
|
||||
expect(result).toBeNull();
|
||||
});
|
||||
});
|
||||
|
||||
describe("removeVideoConferenceFromDescription", () => {
|
||||
it("should return empty string when description is only the Visio line", () => {
|
||||
const description = "Visio: https://meet.linagora.com/abc-defg-hij";
|
||||
const result = removeVideoConferenceFromDescription(description);
|
||||
expect(result).toBe("");
|
||||
});
|
||||
|
||||
it("should remove Visio line when at end of description", () => {
|
||||
const description =
|
||||
"This is a meeting description.\nVisio: https://meet.linagora.com/abc-defg-hij";
|
||||
const result = removeVideoConferenceFromDescription(description);
|
||||
expect(result).toBe("This is a meeting description.");
|
||||
});
|
||||
|
||||
it("should remove Visio line when in middle of description", () => {
|
||||
const description =
|
||||
"Line one\nVisio: https://meet.linagora.com/abc-defg-hij\nLine two";
|
||||
const result = removeVideoConferenceFromDescription(description);
|
||||
expect(result).toBe("Line one\nLine two");
|
||||
});
|
||||
|
||||
it("should leave description unchanged when no Visio line present", () => {
|
||||
const description = "Just a regular meeting description.";
|
||||
const result = removeVideoConferenceFromDescription(description);
|
||||
expect(result).toBe(description);
|
||||
});
|
||||
|
||||
it("should remove Visio line when at start of description", () => {
|
||||
const description =
|
||||
"Visio: https://meet.linagora.com/abc-defg-hij\nRest of the text";
|
||||
const result = removeVideoConferenceFromDescription(description);
|
||||
expect(result).toBe("Rest of the text");
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user