/**
 * (pass-through layout contract).
 */
import React from 'react'
import { render, screen } from '@testing-library/react'

import CallbackLayout from '../layout'

describe('[locale]/callback/layout.tsx — CallbackLayout', () => {
  describe('happy path', () => {
    it('renders children unchanged (transparent wrapper)', () => {
      render(
        <CallbackLayout>
          <div data-testid="leaf">callback-child</div>
        </CallbackLayout>
      )

      expect(screen.getByTestId('leaf')).toHaveTextContent('callback-child')
    })
  })

  describe('module contract', () => {
    it('default export is a function component', () => {
      expect(CallbackLayout).toEqual(expect.any(Function))
    })
  })
})
