import { test } from '@japa/runner'
import { LegacyMock } from '../../../../src/legacy.js'

test.group('LegacyMock.constructor()', (group) => {
  let mock: LegacyMock

  group.each.setup(() => {
    mock = new LegacyMock()
  })

  test('creates the {$self} property')
    .with(['http', 'variables', 'cookies', 'hostRules', 'certificates', 'urls', 'authorization', 'restApi'])
    .run(({ assert }, prop) => {
      assert.ok(mock[prop as keyof LegacyMock])
    })
})
