SShortSingh.
Back to feed

Mutation testing with mutmut and StrykerJS to check whether tests actually verify behavior

0
·13 views

A developer noticed that a pull request with 94% coverage and passing CI still let code changes slip through, since altering a comparison operator or replacing a return value left the tests green. Coverage only shows which lines run, not whether tests check the results. The article introduces mutation testing, where tools generate small faulty versions of code called mutants and check whether the test suite catches them. It demonstrates the approach in Python with mutmut on a shipping fee function, showing how weak assertions and missing boundary cases let mutants survive. The author also outlines StrykerJS configuration for JavaScript and TypeScript projects, highlighting per-test coverage analysis and incremental runs to keep execution fast.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Android Lessons from East Africa: Building Logistics Apps for Low Connectivity

A developer case study explores Android architecture patterns for logistics apps used in East Africa, where connectivity and hardware are limited. It explains that background GPS tracking clashes with aggressive battery optimization on budget phones, which is addressed with Foreground Services, WorkManager, and OEM-specific onboarding flows. To handle sudden connectivity loss during deliveries, the design uses a local-first Room Database with pending-sync flags and reactive sync workers that upload data once any network is detected. Because entry-level devices have limited RAM and storage, the approach also relies on Android App Bundles and lifecycle-aware map cache cleanup to avoid out-of-memory crashes. The article notes it is an independent engineering study with no commercial affiliation.

0
ProgrammingDEV Community ·

Uncommit the Dead: a local tool that revives abandoned side projects with small next steps

A developer built Uncommit the Dead, a local app that lets users select a neglected Git repository and get suggestions from an open-weight AI model. The tool analyzes limited evidence such as the README, TODO lines, filenames, and recent commit messages to propose a small, time-boxed next step. Users can alternatively extract a reusable component or generate a farewell document acknowledging the unfinished work. The app runs on the user's own machine and sends repository context to Ollama rather than a hosted inference service. Setup requires Node 20.9+, Git, Ollama, and a model such as gemma3:4b, and the project was submitted to the Hacktoberfest Open-Source AI Challenge.

0
ProgrammingDEV Community ·

Compound V3 Upgrade Review Flags Moderate 5.8/10 Risk Across Governance and Cross-Chain Paths

A technical compatibility review of Compound V3, which holds roughly $1.34 billion in total value locked across Ethereum mainnet and layer-2 networks, was published on 28 October 2026. The audit examined how protocol upgrades are enabled, covering proxy patterns, governance actions, storage layout, cross-chain bridges, and external integrations. It identified nine attack vectors, including storage slot collisions and replay or state-inconsistency risks during partial upgrades. The protocol received an overall score of 5.8 out of 10, described as moderate, reflecting strong governance and test coverage offset by the high value at stake. The report recommends stricter storage-gap audits, dual timelocks with hardware-secured signers, atomic cross-chain upgrades, and versioned interfaces.

0
ProgrammingDEV Community ·

Valve Prices Steam Frame at $499 and Opens Pre-orders with New Accessories

Valve has announced pricing, a release date, and accessories for its standalone Steam Frame VR headset, and pre-orders are now open. The device is priced at $499 and is described as offering specifications comparable to or exceeding the Meta Quest 3. It includes hand tracking and controllers as standard and supports PC VR streaming through Steam Link. Valve has also made developer resources available, including OpenXR 1.1 extensions and Unity and Unreal templates. The article additionally highlights how broader hardware choice could lower barriers for vision-training applications, such as the Quest-based AmblyoPunch.