/** * Copyright 2022 Gravwell, Inc. All rights reserved. * * Contact: [legal@gravwell.io](mailto:legal@gravwell.io) * * This software may be modified and distributed under the terms of the MIT * license. See the LICENSE file for details. */ import { isVersion } from '~/models/version/is-version'; import { TEST_BASE_API_CONTEXT } from '~/tests/config'; import { integrationTest } from '~/tests/test-types'; import { makeGetAPIVersion } from './get-api-version'; describe('getAPIVersion()', () => { let getAPIVersion: ReturnType; beforeAll(async () => { getAPIVersion = makeGetAPIVersion(await TEST_BASE_API_CONTEXT()); }); it( 'Should get the API version', integrationTest(async () => { const { api, build } = await getAPIVersion(); expect(isVersion(api)).toBeTrue(); expect(isVersion(build)).toBeTrue(); }), ); });