GitHub

MockCountry

import { MockCountry } from '@daffodil/geography/testing'

class MockCountry implements DaffCountry {
  id: faker.datatype.uuid() = faker.datatype.uuid()
  name: faker.random.word() = faker.random.word()
  name_en: faker.random.word() = faker.random.word()
  alpha2: faker.random.alphaNumeric(2) = faker.random.alphaNumeric(2)
  alpha3: faker.random.alphaNumeric(3) = faker.random.alphaNumeric(3)
  subdivisions: DaffSubdivision[] = this.subdivisionFactory.createMany(faker.datatype.number({ min: 0, max: 10 }))
  protected subdivisionFactory: DaffSubdivisionFactory
}