<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/implicit-assertions-are-more-readable-hnorz9yww" -->

---
title: Implicit Assertions Are More Readable | daily.dev
description: A critique of a 
canonical: https://daily.dev/posts/implicit-assertions-are-more-readable-hnorz9yww
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Implicit Assertions Are More Readable | daily.dev
og:description: A critique of a 
og:url: https://daily.dev/posts/implicit-assertions-are-more-readable-hnorz9yww
og:image: https://api.daily.dev/og/posts/hNoRZ9Yww.png
og:image:alt: Implicit Assertions Are More Readable
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Implicit Assertions Are More Readable

**[Gleb Bahmutov](https://daily.dev/sources/glebbahmutov)** · 2 min read · 4 upvotes · 0 comments

## Summary

A critique of a

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://glebbahmutov.com/blog/implicit-assertions-are-more-readable>

## Questions this post answers

### why is closeTo a bad assertion for checking a createdAt timestamp in a Cypress test

A closeTo assertion with a +/- 1 minute tolerance allows a createdAt date to be up to 30 seconds in the future, which is logically impossible for a just-created item. A more precise range check comparing against the current timestamp avoids allowing invalid future dates while still tolerating small timing differences.

_Developers tightening Cypress test assertions can find similar testing critiques and patterns on daily.dev._

### what is cy-spok used for in Cypress tests

cy-spok is a utility that wraps Cypress assertions to verify deeply nested response objects in a single call, including using named predicates for individual properties. It removes the verbosity of writing separate explicit assertions for each field, making API response checks more compact and readable.

_Anyone comparing Cypress assertion styles can track tools like cy-spok through daily.dev._

## Similar posts on daily.dev

- [assert\(\): A modern How To](https://daily.dev/posts/assert-a-modern-how-to-mky6fdnmw) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#testing](https://daily.dev/tags/testing), [#cypress](https://daily.dev/tags/cypress)

[View this post on daily.dev](https://daily.dev/posts/implicit-assertions-are-more-readable-hnorz9yww)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Implicit Assertions Are More Readable","url":"https://daily.dev/posts/implicit-assertions-are-more-readable-hnorz9yww","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/implicit-assertions-are-more-readable-hnorz9yww"},"datePublished":"2026-09-02T01:01:52.742Z","dateModified":"2026-09-02T01:02:11.523Z","description":"A critique of a ","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6127efa27300149f243ab744d14ffae4?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/6127efa27300149f243ab744d14ffae4?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Gleb Bahmutov","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Gleb Bahmutov","logo":"https://media.daily.dev/image/upload/s--TzkdP-7a--/f_auto,q_auto/v1780213676/logos/glebbahmutov?_a=BAMAMiWQ0","url":"https://daily.dev/sources/glebbahmutov"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/implicit-assertions-are-more-readable-hnorz9yww","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,testing,cypress","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Gleb Bahmutov","item":"https://daily.dev/sources/glebbahmutov"},{"@type":"ListItem","position":3,"name":"Implicit Assertions Are More Readable"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/implicit-assertions-are-more-readable-hnorz9yww#faq","mainEntity":[{"@type":"Question","name":"why is closeTo a bad assertion for checking a createdAt timestamp in a Cypress test","acceptedAnswer":{"@type":"Answer","text":"A closeTo assertion with a +/- 1 minute tolerance allows a createdAt date to be up to 30 seconds in the future, which is logically impossible for a just-created item. A more precise range check comparing against the current timestamp avoids allowing invalid future dates while still tolerating small timing differences. Developers tightening Cypress test assertions can find similar testing critiques and patterns on daily.dev."}},{"@type":"Question","name":"what is cy-spok used for in Cypress tests","acceptedAnswer":{"@type":"Answer","text":"cy-spok is a utility that wraps Cypress assertions to verify deeply nested response objects in a single call, including using named predicates for individual properties. It removes the verbosity of writing separate explicit assertions for each field, making API response checks more compact and readable. Anyone comparing Cypress assertion styles can track tools like cy-spok through daily.dev."}}]}
```

