mono/packages/discourse/tests/posts.test.ts
2025-12-30 20:36:17 +01:00

17 lines
496 B
TypeScript

import { describe, it, expect } from 'vitest'
import { getClient } from './commons.js'
describe('Discourse Posts', () => {
const client = getClient()
it('should fetch posts', async () => {
try {
const posts = await client.getPostItems()
expect(posts).toBeDefined()
expect(Array.isArray(posts)).toBe(true)
} catch (e) {
console.warn('Skipping test due to connection error or config', e)
}
})
})