import { describe, test, vi, beforeEach, expect } from 'vitest';
import getClient from './getClient';
import { ClientOptions } from './types';

describe('getClient', () => {
    beforeEach(() => {
        vi.resetAllMocks();
    });

    test('create client', () => {
        const options: ClientOptions = {
            fleetId: 'fleetId',
            baseUrl: 'baseUrl',
            clientId: 'clientId',
            clientSecret: 'clientSecret',
            apiKey: 'apiKey',
        };
        const client = getClient(options);
        expect(client.defaults.baseURL).toEqual(options.baseUrl);
    });
});
