Skip to content

Commit

Permalink
[jest] don't use async describe functions
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Jul 17, 2019
1 parent 771d70c commit 65b60dc
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 20 deletions.
Expand Up @@ -76,7 +76,7 @@ describe('<AutoFollowPatternList />', () => {
});
});

describe('when there are auto-follow patterns', async () => {
describe('when there are auto-follow patterns', () => {
let find;
let exists;
let component;
Expand Down
Expand Up @@ -74,7 +74,7 @@ describe('<FollowerIndicesList />', () => {
});
});

describe('when there are follower indices', async () => {
describe('when there are follower indices', () => {
let find;
let exists;
let component;
Expand Down
Expand Up @@ -45,7 +45,7 @@ describe('license_pre_routing_factory', () => {
});
});

describe('isAvailable is true', async () => {
describe('isAvailable is true', () => {
beforeEach(() => {
mockLicenseCheckResults = {
isAvailable: true
Expand Down
Expand Up @@ -45,7 +45,7 @@ const mockTooltipProperties = [
new MockTooltipProperty('prop2', 'foobar2', false)
];

describe('FeatureProperties', async () => {
describe('FeatureProperties', () => {

test('should not show filter button', async () => {
const component = shallow(
Expand Down
Expand Up @@ -52,7 +52,7 @@ const defaultProps = {
isLocked: false
};

describe('FeatureTooltip (single)', async () => {
describe('FeatureTooltip (single)', () => {

test('should not show close button', async () => {
const component = shallow(
Expand Down Expand Up @@ -91,7 +91,7 @@ describe('FeatureTooltip (single)', async () => {

});

describe('FeatureTooltip (multi)', async () => {
describe('FeatureTooltip (multi)', () => {

test('should not show close button / should show count', async () => {
const component = shallow(
Expand Down
Expand Up @@ -129,7 +129,7 @@ describe('Elasticsearch Settings Find Reason for No Data', () => {
expect(result).to.eql({ found: false });
});

describe('exporters', async () => {
describe('exporters', () => {
it('should warn if all exporters are disabled', async () => {
const input = {
exporters: {
Expand Down
Expand Up @@ -60,7 +60,7 @@ describe('<RemoteClusterList />', () => {
});
});

describe('when there are remote clusters', async () => {
describe('when there are remote clusters', () => {
let find;
let exists;
let component;
Expand Down
Expand Up @@ -296,7 +296,7 @@ describe('CSV Execute Job', function () {
});
});

describe('Cells with formula values', async () => {
describe('Cells with formula values', () => {
it('returns `csv_contains_formulas` when cells contain formulas', async function () {
mockServer.config().get.withArgs('xpack.reporting.csv.checkForFormulas').returns(true);
callWithRequestStub.onFirstCall().returns({
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/reporting/server/routes/jobs.test.js
Expand Up @@ -228,7 +228,7 @@ describe(`when job is completed`, () => {
expect(headers['content-type']).toBe('application/pdf');
});

describe(`when non-whitelisted contentType specified in job output`, async () => {
describe(`when non-whitelisted contentType specified in job output`, () => {
test(`sets statusCode to 500`, async () => {
const { statusCode } = await getCompletedResponse({ outputContentType: 'application/html' });
expect(statusCode).toBe(500);
Expand Down
Expand Up @@ -58,7 +58,7 @@ function getServerMock(customization) {
const getResponseMock = (customization = {}) => customization;

describe('license checks', () => {
describe('with a basic license', async () => {
describe('with a basic license', () => {
let usageStats;
beforeAll(async () => {
const serverWithBasicLicenseMock = getServerMock();
Expand All @@ -83,7 +83,7 @@ describe('license checks', () => {
});
});

describe('with no license', async () => {
describe('with no license', () => {
let usageStats;
beforeAll(async () => {
const serverWithNoLicenseMock = getServerMock();
Expand All @@ -108,7 +108,7 @@ describe('license checks', () => {
});
});

describe('with platinum license', async () => {
describe('with platinum license', () => {
let usageStats;
beforeAll(async () => {
const serverWithPlatinumLicenseMock = getServerMock();
Expand All @@ -135,7 +135,7 @@ describe('license checks', () => {
});
});

describe('with no usage data', async () => {
describe('with no usage data', () => {
let usageStats;
beforeAll(async () => {
const serverWithBasicLicenseMock = getServerMock();
Expand Down
Expand Up @@ -17,7 +17,7 @@ import '../../mock/ui_settings';

import { LastEventTime } from '.';

describe('Last Event Time Stat', async () => {
describe('Last Event Time Stat', () => {
// this is just a little hack to silence a warning that we'll get until react
// fixes this: https://github.com/facebook/react/pull/14853
// For us that mean we need to upgrade to 16.9.0
Expand Down
Expand Up @@ -19,7 +19,7 @@ import { createStore, hostsModel, networkModel, State } from '../../../store';

import { AddToKql } from '.';

describe('AddToKql Component', async () => {
describe('AddToKql Component', () => {
const state: State = mockGlobalState;
let store = createStore(state, apolloClientObservable);

Expand Down
Expand Up @@ -16,7 +16,7 @@ import '../../../../mock/ui_settings';

import { FirstLastSeenHost, FirstLastSeenHostType } from '.';

describe('FirstLastSeen Component', async () => {
describe('FirstLastSeen Component', () => {
// this is just a little hack to silence a warning that we'll get until react
// fixes this: https://github.com/facebook/react/pull/14853
// For us that mean we need to upgrade to 16.9.0
Expand Down
Expand Up @@ -21,7 +21,7 @@ describe('getDeprecationLoggingStatus', () => {
});

describe('setDeprecationLogging', () => {
describe('isEnabled = true', async () => {
describe('isEnabled = true', () => {
it('calls cluster.putSettings with logger.deprecation = WARN', async () => {
const callWithRequest = jest.fn();
await setDeprecationLogging(callWithRequest, {} as any, true);
Expand All @@ -31,7 +31,7 @@ describe('setDeprecationLogging', () => {
});
});

describe('isEnabled = false', async () => {
describe('isEnabled = false', () => {
it('calls cluster.putSettings with logger.deprecation = ERROR', async () => {
const callWithRequest = jest.fn();
await setDeprecationLogging(callWithRequest, {} as any, false);
Expand Down
Expand Up @@ -7,7 +7,7 @@
import * as kbnTestServer from '../../../../src/test_utils/kbn_server';
import { TestKbnServerConfig } from '../../kbn_server_config';

describe('example integration test with kbn server', async () => {
describe('example integration test with kbn server', () => {
let kbn: any;
let kbnServer: any;
let kbnRootServer: any;
Expand Down

0 comments on commit 65b60dc

Please sign in to comment.