diff --git a/__tests__/index.test.js b/__tests__/index.test.js index 5e3e728..e6e5f65 100644 --- a/__tests__/index.test.js +++ b/__tests__/index.test.js @@ -13,4 +13,6 @@ test('returns null as id and service', () => { service: null, }; expect(fn('foo')).toMatchObject(expected); + expect(fn(' { test('returns undefined when no src= is found', () => { expect(fn('hello')).toBe(undefined); + expect(fn(' { diff --git a/src/index.js b/src/index.js index 5aba94d..d521096 100644 --- a/src/index.js +++ b/src/index.js @@ -20,7 +20,7 @@ function getVideoId(urlString) { let string_ = urlString; if (/