// generated by codelife — maintained by hand
//
// A build that produces a file nothing can import fails no other test: the unit tests run against
// the source, and the surface snapshot reads the module without exercising it. This one loads the
// shipped artefact the way a consumer does and uses it once.
import { describe, expect, it } from 'vitest'
import { entries } from './entries'

describe('the shipped build', () => {
  for (const [subpath, file] of Object.entries(entries())) {
    it(`imports ${subpath}`, async () => {
      const built = await import(file)
      expect(Object.keys(built).length).toBeGreaterThan(0)
    })
  }

  it('runs its main entry point once', async () => {
    // Replace with the smallest real call the library offers — the one its README opens on.
    const built = await import(entries()['.'])
    expect(built).toBeDefined()
  })
})
