---
title: "Discussion on \".toBe(true) or .toBeTruthy()\" | Hashnode"
description: "Discussion on \".toBe(true) or .toBeTruthy()\". I was reviewing a feature on GitHub and noticed my colleague sometimes used .toBe(true) and other times .toBeTruthy(). This got me wondering, are they actually different? After a quick search, I found out they are – and it's all in their names 😅. In..."
url: "https://hashnode.com/posts/tobetrue-or-tobetruthy/65b3cb14cd44cae20896fc55"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [.toBe(true) or .toBeTruthy()](https://blog.majidz.com/tobetrue-or-tobetruthy?utm_source=hashnode&utm_medium=feed)

I was reviewing a feature on GitHub and noticed my colleague sometimes used .toBe(true) and other times .toBeTruthy(). This got me wondering, are they actually different? After a quick search, I found out they are – and it's all in their names 😅. In...

Jan 26, 2024 · 1 min read · blog.majidz.com  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#tips](https://hashnode.com/tag/tips)
-   [#testing](https://hashnode.com/tag/testing)
-   [#unit-testing](https://hashnode.com/tag/unit-testing)
-   [#jest](https://hashnode.com/tag/jest)

## Written by

[Majid Eltayeb](https://hashnode.com/@majidzeno)

@majidzeno · Giza, Egypt

  
[View profile](https://hashnode.com/@majidzeno)

👾

## Responses 1

Markdown supported · ⌘↵ to post

[Ahmed Nasser](https://hashnode.com/@nasser009)

[Jan 27, 2024](https://hashnode.com/posts/tobetrue-or-tobetruthy/65b3cb14cd44cae20896fc55/comment/65b4ef5bbbc2501d1e358c63)

Great article, keep rockinggg 🤘🚀🚀🚀
