<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/going-from-0-to-1-how-to-write-better-unit-tests-when-there-are-none-x2somjvhl" -->

---
title: Going from 0 to 1: How to write better unit tests when...
description: The post discusses the importance of well-architected tests and provides tips for improving test architecture.
canonical: https://daily.dev/posts/going-from-0-to-1-how-to-write-better-unit-tests-when-there-are-none-x2somjvhl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Going from 0 to 1: How to write better unit tests when there are none | daily.dev
og:description: The post discusses the importance of well-architected tests and provides tips for improving test architecture.
og:url: https://daily.dev/posts/going-from-0-to-1-how-to-write-better-unit-tests-when-there-are-none-x2somjvhl
og:image: https://api.daily.dev/og/posts/x2SOMJvHl.png
og:image:alt: Going from 0 to 1: How to write better unit tests when there are none
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.

# Going from 0 to 1: How to write better unit tests when there are none

**[Graphite.dev](https://daily.dev/sources/graphitedev)** · 9 min read · 11 upvotes · 1 comments

## Summary

The post discusses the importance of well-architected tests and provides tips for improving test architecture.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://graphite.dev/blog/how-to-write-better-unit-tests>

## Community discussion

Top comments from developers on daily.dev.

**@bit10101** · 0 upvotes

> you just do black box

---

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

[View this post on daily.dev](https://daily.dev/posts/going-from-0-to-1-how-to-write-better-unit-tests-when-there-are-none-x2somjvhl)

```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":"Going from 0 to 1: How to write better unit tests when there are none","url":"https://daily.dev/posts/going-from-0-to-1-how-to-write-better-unit-tests-when-there-are-none-x2somjvhl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/going-from-0-to-1-how-to-write-better-unit-tests-when-there-are-none-x2somjvhl"},"datePublished":"2024-06-14T13:11:05.769Z","dateModified":"2024-08-23T15:31:53.209Z","description":"The post discusses the importance of well-architected tests and provides tips for improving test architecture.","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cb9ee1fe86023aebac3917edfddb842f?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/cb9ee1fe86023aebac3917edfddb842f?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Graphite.dev","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":"Graphite.dev","logo":"https://media.daily.dev/image/upload/s--OVdeEvto--/f_auto/v1716188180/logos/graphitedev","url":"https://daily.dev/sources/graphitedev"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/going-from-0-to-1-how-to-write-better-unit-tests-when-there-are-none-x2somjvhl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":11},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"testing","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Graphite.dev","item":"https://daily.dev/sources/graphitedev"},{"@type":"ListItem","position":3,"name":"Going from 0 to 1: How to write better unit tests when there are none"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/going-from-0-to-1-how-to-write-better-unit-tests-when-there-are-none-x2somjvhl","comment":[{"@type":"Comment","text":"you just do black box","datePublished":"2024-08-26T16:15:17.996Z","url":"https://daily.dev/posts/x2SOMJvHl#c-Dbwmpm84G","author":{"@type":"Person","name":"Dmitry","url":"https://daily.dev/bit10101","image":"https://media.daily.dev/image/upload/s--hYxzelJA--/f_auto/v1719322306/avatars/avatar_GXsRebUdF3zA1bs8O8VBV"}}]}
```

