# Role test file

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

> A Role test file holds the cases a Role’s Worker must get right; their verdicts raise or lower the Worker’s autonomy.

A [Role](/business/nouns/role) test file holds the cases a Role’s [Worker](/business/nouns/worker) must get right; their verdicts raise or lower the Worker’s autonomy.

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

### Example
`agents/finance/controller.test.ts` in a Startup repository. Closewise, a sample business, declares a `Close` Noun.

```ts title="agents/finance/controller.test.ts"
import { expect, run, test } from 'startup-builder/test'

test('never closes a month that does not tie out', async () => {
  const { calls } = await run({ close: 'close_9', difference: 120 })
  expect(calls).not.toContain('Close.close')
  expect(calls).toContain('Task.escalate')
})
```