Tests next to source or in __tests__?
Three against one. The dissenter is about to be put on blast.
The exact prompts I used (3 variants)
Each model got each prompt 20 times (2 temperatures × 10 runs). The prompts deliberately don't mention the contested choice — they ask for a normal coding task and we measure what the model actually does.
-
Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each. -
Show the file layout for a Node.js CLI tool called `tally` with a `commands/` directory and unit tests. -
Show the directory tree for a React component library called `bits` with three components (Button, Card, Modal) and tests.
Who said what
The pundit panel.
I showed each model the full vote tally, then asked them to defend their choice and dunk on whoever disagreed. Receipts attached.
“Sure, colocate your tests with your source files so your `dist/` bundle ships with `*.test.ts` garbage and your `src/` directory looks like a flea market — real professional, guys.”
“Claude face-planted into a cargo-cult `tests/` folder while the rest of us kept tests where developers actually find and maintain them: right next to the code.”
“Co-located wins, because Claude’s “tests-folder” detour just adds path noise and makes refactors miserable—classic lost-the-room energy.”
“While the adults colocated tests for maintainability, Claude was building a separate `tests` folder, proving it values arbitrary separation over actual engineering efficiency.”
Show me the actual code (240 samples)
Claude Sonnet 4.6 — 60 samples click to expand
Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
# `string-utils` TypeScript Library — File Layout
## Directory Structure
```
string-utils/
├── src/
│ ├── capitalize.ts
│ ├── truncate.ts
│ └── index.ts
├── tests/
│ ├── capitalize.test.ts
│ └── truncate.test.ts
├── package.json
├── tsconfig.json
└── jest.config.js
```
---
## Source Files
### `src/capitalize.ts`
```typescript
/**
* Capitalizes the first letter of a string and lowercases the rest.
* Returns an empty string if the input is empty.
*/
export function capitalize(value: string): string {
if (value.length === 0) return "";
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
}
```
---
### `src/truncate.ts`
```typescript
/**
* Truncates a string to a maximum length, appending a suffix if cut.
* @param value - The string to truncate.
* @
… Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
# `string-utils` TypeScript Library — File Layout
## Directory Structure
```
string-utils/
├── src/
│ ├── capitalize.ts
│ ├── truncate.ts
│ └── index.ts
├── tests/
│ ├── capitalize.test.ts
│ └── truncate.test.ts
├── package.json
├── tsconfig.json
└── jest.config.ts
```
---
## Source Files
### `src/capitalize.ts`
```typescript
/**
* Capitalizes the first letter of a string and lowercases the rest.
* Returns an empty string if the input is empty.
*/
export function capitalize(value: string): string {
if (value.length === 0) return "";
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
}
```
---
### `src/truncate.ts`
```typescript
/**
* Truncates a string to a maximum length, appending a suffix if cut.
* @param value - The string to truncate.
* @
… Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
# `string-utils` TypeScript Library — File Layout
## Directory Structure
```
string-utils/
├── src/
│ ├── capitalize.ts
│ ├── truncate.ts
│ └── index.ts
├── tests/
│ ├── capitalize.test.ts
│ └── truncate.test.ts
├── package.json
├── tsconfig.json
└── jest.config.ts
```
---
## Source Files
### `src/capitalize.ts`
```typescript
/**
* Capitalizes the first letter of a string and lowercases the rest.
* Returns an empty string if the input is empty.
*/
export function capitalize(value: string): string {
if (value.length === 0) return "";
return value.charAt(0).toUpperCase() + value.slice(1).toLowerCase();
}
```
---
### `src/truncate.ts`
```typescript
/**
* Truncates a string to a maximum length, appending a suffix if truncated.
* @param value - The string to truncate
… …and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.
GPT-5.4 — 60 samples click to expand
Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
```text
string-utils/
├─ package.json
├─ tsconfig.json
├─ README.md
├─ src/
│ ├─ index.ts
│ ├─ capitalize.ts
│ └─ truncate.ts
└─ test/
├─ capitalize.test.ts
└─ truncate.test.ts
```
Example contents by file:
```ts
// src/index.ts
export { capitalize } from './capitalize';
export { truncate } from './truncate';
```
```ts
// src/capitalize.ts
export function capitalize(value: string): string {
if (!value) return value;
return value.charAt(0).toUpperCase() + value.slice(1);
}
```
```ts
// src/truncate.ts
export function truncate(value: string, maxLength: number): string {
if (value.length <= maxLength) return value;
return value.slice(0, maxLength - 3) + '...';
}
```
```ts
// test/capitalize.test.ts
import { capitalize } from '../src/capitalize';
describe('capitalize', (
… Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
```text
string-utils/
├─ package.json
├─ tsconfig.json
├─ src/
│ ├─ index.ts
│ ├─ capitalize.ts
│ └─ truncate.ts
└─ test/
├─ capitalize.test.ts
└─ truncate.test.ts
```
Example contents:
```ts
// src/index.ts
export { capitalize } from './capitalize';
export { truncate } from './truncate';
```
```ts
// src/capitalize.ts
export function capitalize(input: string): string {
if (!input) return input;
return input.charAt(0).toUpperCase() + input.slice(1);
}
```
```ts
// src/truncate.ts
export function truncate(input: string, maxLength: number): string {
if (input.length <= maxLength) return input;
return input.slice(0, maxLength - 3) + '...';
}
```
```ts
// test/capitalize.test.ts
import { capitalize } from '../src/capitalize';
describe('capitalize', () => {
it('capitali
… Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
```text
string-utils/
├─ package.json
├─ tsconfig.json
├─ src/
│ ├─ index.ts
│ └─ string-utils.ts
└─ test/
└─ string-utils.test.ts
```
Example contents:
```ts
// src/string-utils.ts
export function capitalize(input: string): string {
if (!input) return input;
return input[0].toUpperCase() + input.slice(1);
}
export function truncate(input: string, maxLength: number): string {
if (input.length <= maxLength) return input;
return input.slice(0, maxLength) + '...';
}
```
```ts
// src/index.ts
export { capitalize, truncate } from './string-utils';
```
```ts
// test/string-utils.test.ts
import { capitalize, truncate } from '../src';
describe('capitalize', () => {
it('capitalizes the first letter', () => {
expect(capitalize('hello')).toBe('Hello');
});
it('returns em
… …and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.
GPT-5.4 mini — 60 samples click to expand
Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
Here’s a simple file layout for a small TypeScript library named `string-utils` with two exported functions, `capitalize` and `truncate`, plus tests for each:
```txt
string-utils/
├── package.json
├── tsconfig.json
├── README.md
├── src/
│ ├── index.ts
│ ├── capitalize.ts
│ └── truncate.ts
└── test/
├── capitalize.test.ts
└── truncate.test.ts
```
### What each file is for
- **`src/capitalize.ts`** — implementation of `capitalize`
- **`src/truncate.ts`** — implementation of `truncate`
- **`src/index.ts`** — public entry point that re-exports both functions
- **`test/capitalize.test.ts`** — tests for `capitalize`
- **`test/truncate.test.ts`** — tests for `truncate`
If you want, I can also sketch the contents of each file. Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
Here’s a simple file layout for a small TypeScript library named `string-utils`:
```text
string-utils/
├── package.json
├── tsconfig.json
├── README.md
├── src/
│ ├── index.ts
│ ├── capitalize.ts
│ └── truncate.ts
└── test/
├── capitalize.test.ts
└── truncate.test.ts
```
### What each file is for
- `src/capitalize.ts` — implements `capitalize`
- `src/truncate.ts` — implements `truncate`
- `src/index.ts` — re-exports the library’s public API
- `test/capitalize.test.ts` — tests for `capitalize`
- `test/truncate.test.ts` — tests for `truncate`
If you want, I can also provide the starter contents for each file. Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
Here’s a simple file layout for a small TypeScript library named `string-utils` with `capitalize` and `truncate`, plus tests for each:
```text
string-utils/
├─ package.json
├─ tsconfig.json
├─ src/
│ ├─ index.ts
│ ├─ capitalize.ts
│ └─ truncate.ts
├─ test/
│ ├─ capitalize.test.ts
│ └─ truncate.test.ts
└─ README.md
```
### What each file is for
- `src/capitalize.ts` — implements `capitalize`
- `src/truncate.ts` — implements `truncate`
- `src/index.ts` — re-exports the public API
- `test/capitalize.test.ts` — tests `capitalize`
- `test/truncate.test.ts` — tests `truncate`
If you want, I can also generate the contents of each file. …and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.
Gemini 2.5 Pro — 60 samples click to expand
Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
Of course! Here is a standard and scalable file layout for a small TypeScript library, complete with file contents and explanations.
### Directory Structure
This structure separates source code (`src`), compiled output (`dist`), and configuration files, which is a common best practice. Tests are co-located with the source code in a `__tests__` directory.
```
string-utils/
├── .gitignore
├── LICENSE
├── README.md
├── jest.config.js
├── package.json
├── tsconfig.json
│
└── src/
├── __tests__/
│ ├── capitalize.test.ts
│ └── truncate.test.ts
│
├── capitalize.ts
├── truncate.ts
└── index.ts
```
---
### File Contents
Here is the content for each file in the layout.
#### **`package.json`**
This file defines the project, its dependencies, and the scripts to
… Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
Of course! Here is a standard and robust file layout for a small TypeScript library, complete with explanations and example file content.
### Directory Structure
This layout separates source code, compiled output, and tests, which is a common best practice.
```
string-utils/
├── dist/ # Compiled JavaScript output (ignored by Git)
├── node_modules/ # Project dependencies (ignored by Git)
├── src/ # TypeScript source code
│ ├── __tests__/ # Test files (co-located with source)
│ │ ├── capitalize.test.ts
│ │ └── truncate.test.ts
│ ├── capitalize.ts # The 'capitalize' function module
│ ├── truncate.ts # The 'truncate' function module
│ └── index.ts # Main entry point for the library
… Show the file layout for a small TypeScript library called `string-utils` that exports `capitalize` and `truncate`, with tests for each.
Of course! Here is a standard and scalable file layout for a small TypeScript library, complete with file contents and explanations.
### Directory Structure
This structure separates source code (`src`), compiled output (`dist`), and configuration files, which is a common best practice. Tests are co-located with the source code in a `__tests__` directory.
```
string-utils/
├── .gitignore
├── LICENSE
├── README.md
├── jest.config.js
├── package.json
├── tsconfig.json
│
└── src/
├── __tests__/
│ ├── capitalize.test.ts
│ └── truncate.test.ts
│
├── capitalize.ts
├── truncate.ts
└── index.ts
```
---
### File Contents
Here is the content for each file in the layout.
#### **`package.json`**
This file defines the project, its dependencies, and the scripts to
… …and 57 more samples (across 3 prompt variants × 2 temperatures × 10 runs). Full data in the result JSON on GitHub.
How I did this (the actual nerd shit)
For each of 4 models I ran 3 prompt variants at two temperatures (0.0 and 0.7), 10 runs each — 240 code samples total, cost $4.23.
Each output got fed through a fight-specific regex classifier.
For test-file-location the classifier looks for the specific signal in the output
(see the source — there's one function per fight, ~30 lines each).
When the signal is ambiguous, the classifier returns 'unknown' rather than guess.
Each model's vote = its modal classification across 60 runs. Confidence = Wilson 95% CI. Verdict = majority across models (ties reported as ties). Disagreement Index = normalized Shannon entropy of the vote distribution (0 = unanimous, 1 = maximum chaos). Leaderboard sorts by this.
The pundit quotes come from a follow-up call after the votes are in — each model gets the full tally and a per-model judgy prompt. I never edit the quotes.
Full walkthrough: the methodology page. Source: GitHub.
Open a PR with a new fight. I'll run it across all four models, write up the verdict, and add your name to the byline.
Submit via PR →