Revision control

Copy as Markdown

Other Tools

/* -*- Mode: JavaScript; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
"use strict";
const { extractJoinLink } = ChromeUtils.importESModule(
);
const providers = {
zoom: [
{
description: `
You don't often get email from noreply-zoomevents@zoom.us.
Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
• Oct 5, 2024 8:45 AM - Oct 5, 2024 3:30 PM EDT
• Organized by me
• 1 Ticket
`,
},
{
description: `
You don't often get email from noreply-zoomevents@zoom.us.
Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
• Oct 5, 2024 8:45 AM - Oct 5, 2024 3:30 PM EDT
• Organized by me
• 1 Ticket
`,
},
{
description: `
You don't often get email from noreply-zoomevents@zoom.us.
Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
• Oct 5, 2024 8:45 AM - Oct 5, 2024 3:30 PM EDT
• Organized by me
• 1 Ticket
`,
},
],
teams: [
{
description: `
Microsoft Teams Need help?<https://aka.ms/JoinTeamsMeeting?omkt=en-GB>
`,
},
],
webex: [
{
description: `
Hotspex's WebEx Meeting
When it's time, join the meeting from here:
`,
},
],
meet: [
{
description: `
Meeting from https://www.google.com
When it's time, join the meeting from here:
`,
},
],
goToMeet: [
{
description: `
Meeting from https://www.goto.com
When it's time, join the meeting from here:
`,
},
],
blueJeans: [
{
description: `Meeting from https://www.bluejeans.com
When it's time, join the meeting from here:
},
],
jitsi: [
{
description: `
Meeting from https://www.jist.si
When it's time, join the meeting from here:
`,
},
],
whereby: [
{
description: `
When it's time, join the meeting from here:
`,
},
],
ringcentral: [
{
description: `
When it's time, join the meeting from here:
`,
},
],
chime: [
{
description: `
When it's time, join the meeting from here:
`,
},
],
};
add_task(function test_noJoinkLink() {
const description =
"This is an example description with a link https://testzoom.us";
const joinLink = extractJoinLink(description);
Assert.equal(joinLink, null, "Should not return a join link");
});
add_task(function test_providerJoinLinks() {
for (const [provider, dataArray] of Object.entries(providers)) {
for (const data of dataArray) {
const joinLink = extractJoinLink(data.description);
Assert.equal(
joinLink,
data.joinLink,
`Should return correct ${provider} link`
);
}
}
});