feat: Add Google DataStudio embed (#2293)

Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
Matheus Breguêz
2021-07-14 15:57:12 -03:00
committed by GitHub
parent 8e5a2b85c2
commit 06e16eef12
4 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
/* eslint-disable flowtype/require-valid-file-annotation */
import GoogleDataStudio from "./GoogleDataStudio";
describe("GoogleDataStudio", () => {
const match = GoogleDataStudio.ENABLED[0];
test("to be enabled on share link", () => {
expect(
"https://datastudio.google.com/embed/reporting/aab01789-f3a2-4ff3-9cba-c4c94c4a92e8/page/7zFD".match(
match
)
).toBeTruthy();
});
test("to not be enabled elsewhere", () => {
expect("https://datastudio.google.com/u/0/".match(match)).toBe(null);
expect("https://datastudio.google.com".match(match)).toBe(null);
expect("https://www.google.com".match(match)).toBe(null);
});
});