# Scenario test file

URL: /code/project-structure/scenario-tests · Id: `convention:scenario-tests`

> A scenario test file walks the Startup end to end with test keys, as a buyer who orders, pays and accepts would.

A scenario test file walks the [Startup](/business/nouns/startup) end to end with test keys, as a buyer who orders, pays and accepts would.

| Property | Value |
| --- | --- |
| Path | `tests/[scenario].test.ts` |
| Holds | [Startup](/business/nouns/startup) |
| Kind | file |
| Leaders | db-first, git-first |
| Team | [Quality Team](/agents/quality) |
| Written by | None. |
| Compiled by | [StartupBuilder](/code/builders/startup) |

### Example
`tests/first-close.test.ts` in a Startup repository.

```ts title="tests/first-close.test.ts"
import { clock, expect, test, walk } from 'startup-builder/test'

test('an agency that subscribes gets its first month closed', async () => {
  const agency = await walk('client')
  await agency.subscribe('monthly-close')
  await agency.import('mappings/bank-statement', 'fixtures/september.csv')
  await clock.advance('5 days')
  expect(await agency.inbox()).toContainMessage('Your books for 2026-09 are closed')
})
```