UNPKG

@vulog/aima-client

Version:

```bash npm i @vulog/aima-client ```

22 lines (19 loc) 611 B
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); }); });