Files
2026-07-13 13:34:48 +08:00

13 lines
427 B
TypeScript

import { expect, test } from 'vitest'
import _ from 'lodash'
import * as config from './config'
import * as chat from '../src'
const invalidApiUrl = config.get('API_URL') + '1234'
test('client throws if webhook id is incorrect', async () => {
const client = new chat.Client({ apiUrl: invalidApiUrl })
const userPromise = client.createUser({ id: 'invalid' })
expect(userPromise).rejects.toThrow(chat.ChatClientError)
})