From 49a54ebedc7f186a849ed36825a0a795284d1fbe Mon Sep 17 00:00:00 2001 From: Omer Levy Date: Sun, 8 Oct 2017 16:25:02 +0300 Subject: [PATCH] [tests] remove unnecessary promise resulotions and add fetch to the .eslintrc --- tests/.eslintrc | 3 ++- tests/src/tests/links/linksTests.js | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/.eslintrc b/tests/.eslintrc index 7852bd12..91cb3e62 100644 --- a/tests/.eslintrc +++ b/tests/.eslintrc @@ -36,6 +36,7 @@ }, "globals": { "__DEV__": true, - "window": true + "window": true, + "fetch": true, } } diff --git a/tests/src/tests/links/linksTests.js b/tests/src/tests/links/linksTests.js index 12d7dea8..8fc7ff13 100644 --- a/tests/src/tests/links/linksTests.js +++ b/tests/src/tests/links/linksTests.js @@ -74,7 +74,6 @@ function linksTests({ describe, it, firebase, tryCatch }) { result.includes(`${key}=${encodedVal}`) || result.includes(`${key}=${encodedValWithPeriod}`)).should.be.true(); }); - Promise.resolve(); }); it('create long dynamic link with minimal parameters', async () => { @@ -93,7 +92,6 @@ function linksTests({ describe, it, firebase, tryCatch }) { const encodedLinkWithEncodedPeriod = encodeURIComponent(link).replace(/\./g, '%2E'); (result.includes(`link=${encodedLink}`) || result.includes(`link=${encodedLinkWithEncodedPeriod}`)).should.be.true(); - Promise.resolve(); }); it('fail to create long dynamic link with empty data object', () => { @@ -382,7 +380,6 @@ function linksTests({ describe, it, firebase, tryCatch }) { const response = await fetch(result); url.should.eql(response.url); - Promise.resolve(); }); it('create short (short) dynamic link with all supported parameters', async () => { @@ -420,21 +417,19 @@ function linksTests({ describe, it, firebase, tryCatch }) { const response = await fetch(result); url.should.eql(response.url); - Promise.resolve(); }); it('getInitialLink should return null', async () => { const initialLink = await links.getInitialLink(); should(initialLink).be.null(); - Promise.resolve(); }); it('should listen to link', () => { const unsubscribe = links.onLink((url: string) => { + console.log(url); // handle link }); unsubscribe(); - Promise.resolve(); }); }); }