kibana/test/functional/services/supertest.ts
Tyler Smalley 689d974729
Removes supertest-as-promised dependency (#100486)
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
2021-08-16 18:01:34 -07:00

19 lines
733 B
TypeScript

/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/
import { FtrProviderContext } from 'test/functional/ftr_provider_context';
import { format as formatUrl } from 'url';
import supertest from 'supertest';
export function KibanaSupertestProvider({ getService }: FtrProviderContext) {
const config = getService('config');
const kibanaServerUrl = formatUrl(config.get('servers.kibana'));
return supertest(kibanaServerUrl);
}