---
title: "toBeFalsy() | Grafana k6 documentation"
description: "Asserts that a value is falsy"
---

# toBeFalsy()

The `toBeFalsy()` method asserts that a value is falsy in JavaScript. A value is falsy if it converts to `false` when evaluated in a boolean context.

## Syntax

JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```javascript
expect(actual).toBeFalsy();
expect(actual).not.toBeFalsy();
```

## Returns

Expand table

| Type | Description     |
|------|-----------------|
| void | No return value |

## Description

The `toBeFalsy()` method checks if a value is falsy. In JavaScript, the following values are falsy:

- `false`
- `0`
- `-0`
- `0n` (BigInt)
- `""` (empty string)
- `null`
- `undefined`
- `NaN`

All other values are truthy.

## Usage

JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```javascript
import { expect } from 'https://jslib.k6.io/k6-testing/0.6.1/index.js';

export default function () {
  expect(false).toBeFalsy();
  expect(0).toBeFalsy();
  expect(-0).toBeFalsy();
  expect(0n).toBeFalsy();
  expect('').toBeFalsy();
  expect(null).toBeFalsy();
  expect(undefined).toBeFalsy();
  expect(NaN).toBeFalsy();
}
```
