Skip to content
This repository has been archived by the owner on Jul 13, 2019. It is now read-only.

Commit

Permalink
Use configured timeout for async tasks in diagnostics
Browse files Browse the repository at this point in the history
This reverts commit d39d7f9,
which added timeouts for the async tests.

Commit dc99f5d added a global setting
for all of Mocha, passed during the setup, so per-test configuration
should no longer necessary.
  • Loading branch information
nmalkin committed Dec 21, 2018
1 parent dc99f5d commit 0187d62
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/chrome/pages/diagnostics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import {
} from '../../common/alexa/amazon';
import { Interaction } from '../../common/types';

const ASYNC_TIMEOUT = 5000;

enum Tests {
all = 'all',
google = 'google',
Expand Down Expand Up @@ -66,8 +64,7 @@ function setupMocha() {
}

context('Fetching CSRF token', async () => {
before('Fetch CSRF token', async function() {
this.timeout(ASYNC_TIMEOUT);
before('Fetch CSRF token', async () => {
token = await fetchCsrfToken();
});

Expand All @@ -87,8 +84,7 @@ function setupMocha() {
});

context('Fetching JSON data', async () => {
before('Fetch JSON data', async function() {
this.timeout(ASYNC_TIMEOUT);
before('Fetch JSON data', async () => {
json = await fetchJsonData(token);
});

Expand Down

0 comments on commit 0187d62

Please sign in to comment.