firecrawl / firecrawl/last30flames

format.test.ts expects "merged into one numbered entry" but formatBundle emits "merged into 1"

Open Beginner friendly
#27 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
38
Forks
8
PR merge metrics
No merged PRs in 30d

Description

`bun test` fails one of 21 tests at `c3a7c3a` (current `main`).

**Failing test:** `scripts/format.test.ts:80`, in "renders a merged entry with combined origins and per-origin signals"

```
expect(out).toContain("merged into one numbered entry");
```

**What the code emits:** `scripts/format.ts:59` interpolates the cluster count as a number:

```ts
`... merged into ${clusters.length} numbered ${clusters.length === 1 ? "entry" : "entries"} where the same story appeared in several sources.\n`
```

so a single cluster renders `merged into 1 numbered entry`, and the assertion looking for the spelled-out `one` never matches.

**Reproduce:**

```
bun test
# 20 pass, 1 fail
```

The singular/plural switch on `entry` / `entries` already works; only the count word differs. Either the test should expect `merged into 1 numbered entry`, or `format.ts` should spell out the count when it is 1 — the second reads slightly better in the header, but it is your call which side is the intended behaviour.

Found while vendoring the skill; no local patch applied, so the package stays refreshable.

Contributor guide

Open the contributing guide

Research direction

Start by running `bun test` and read the failing case at `scripts/format.test.ts:80` alongside the message construction at `scripts/format.ts:59`. Decide whether the intended wording belongs in the test or formatter, then update the relevant expectation or behavior so the full test suite passes with consistent singular/plural wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, typescript
Domain
testing-qa
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.