Fixed: Added support for new loom domain name

This commit is contained in:
Tom Moor 2019-05-07 19:32:03 -07:00
parent 3eb67eaecf
commit d5f6311bbc
2 changed files with 7 additions and 1 deletions

View File

@ -2,7 +2,7 @@
import * as React from 'react';
import Frame from './components/Frame';
const URL_REGEX = /^https:\/\/(www\.)?useloom.com\/(embed|share)\/(.*)$/;
const URL_REGEX = /^https:\/\/(www\.)?(use)?loom.com\/(embed|share)\/(.*)$/;
type Props = {
url: string,

View File

@ -6,6 +6,9 @@ const { Loom } = embeds;
describe('Loom', () => {
const match = Loom.ENABLED[0];
test('to be enabled on share link', () => {
expect(
'https://www.loom.com/share/55327cbb265743f39c2c442c029277e0'.match(match)
).toBeTruthy();
expect(
'https://www.useloom.com/share/55327cbb265743f39c2c442c029277e0'.match(
match
@ -14,6 +17,9 @@ describe('Loom', () => {
});
test('to be enabled on embed link', () => {
expect(
'https://www.loom.com/embed/55327cbb265743f39c2c442c029277e0'.match(match)
).toBeTruthy();
expect(
'https://www.useloom.com/embed/55327cbb265743f39c2c442c029277e0'.match(
match