import AdditionalFeatures from './AdditionalFeatures'
import { MiddlewareProps } from 'hooks/use-resource-detail'
import { renderWithProviders } from 'utils/test'
describe('', () => {
it('should render the middleware info', () => {
renderWithProviders()
})
it('should render the middleware info with number', () => {
const middlewares: MiddlewareProps[] = [
{
retry: {
attempts: 2,
},
},
]
const { container } = renderWithProviders()
expect(container.innerHTML).toContain('Retry: Attempts=2')
})
it('should render the middleware info with string', () => {
const middlewares: MiddlewareProps[] = [
{
circuitBreaker: {
expression: 'expression',
},
},
]
const { container } = renderWithProviders()
expect(container.innerHTML).toContain('CircuitBreaker: Expression="expression"')
})
it('should render the middleware info with string', () => {
const middlewares: MiddlewareProps[] = [
{
rateLimit: {
burst: 100,
average: 100,
},
},
]
const { container } = renderWithProviders()
expect(container.innerHTML).toContain('RateLimit: Burst=100, Average=100')
})
})