Urgent.News

What's breaking now, across thousands of outlets.

Tech

Tests that prove something: break a copy and see the test fail

A green suite only counts if it can go red. So when a test is written for a fix, the practice in Yonto Player's repo is to revert the fix and watch that test fail, and to break the exact line the test claims to hold. This post is how that loop works, how to run it safely, and what to do with fakes so the loop is cheap. Two questions, both answered by failing There are two claims a change can…

When a test is written to verify a bug fix, the Yonto Player repository practice is to revert the fix and confirm that the test fails. This loop demonstrates the effectiveness of the fix and helps isolate the issue. Two claims can be made about a change: it either addresses a behavior or establishes a rule. The proof for each claim involves a test that fails without the fix (showing the original problem) or requires mutating the code to break a specific rule (demonstrating the new rule holds).

The repository's testing notes provide guidance on how to mutate the code safely and effectively. Mutations should be performed one decision at a time, reverting each change individually to ensure the change is isolated and the test failure accurately reflects the impact of the fix. Break the last item of a loop rather than the first, and check that multiple failures are reported when multiple mutations survive.

If a mutation fails to apply, it indicates the code is untested or the change is ineffective. Use fakes, such as a fake content source with call counters or gates, to speed up the mutation process and make it more precise.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Pilotfish: Redesigning Browser Agents

An agent opens an invoice. The network is quiet. The DOM has stopped changing. The balance says $8,400 , under a banner that reads "Refreshing balances" .

  • Pilotfish redesigns browser agents with diff-based approach
  • Maintains row integrity and minimizes page content repetition
  • Emphasizes full observation base for efficient diff execution

276,000 offers, 1 sale: vanity metrics vs real KPIs after 53 days

TL;DR I'm building Runometry , a price comparison site for sports gear, solo, with Angular/AnalogJS on Cloudflare. After 53 days: 276,000+ live offers, 800,000+ prices recorded, 2,800+ models.

  • Runometry generated 276,000+ offers and 800,000+ prices in 53 days
  • Only 900+ clicks led to 1 sale and €2.75 commission
  • Site struggled to index by Google despite 43,000 indexable pages

More from Thursday 19 November →