---
title: "toBeGreaterThanOrEqual() | Grafana k6 documentation"
description: "Asserts that a numeric value is greater than or equal to another value"
---

# toBeGreaterThanOrEqual()

The `toBeGreaterThanOrEqual()` method asserts that a numeric value is greater than or equal to another value.

## Syntax

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

```javascript
expect(actual).toBeGreaterThanOrEqual(expected);
expect(actual).not.toBeGreaterThanOrEqual(expected);
```

## Parameters

Expand table

| Parameter | Type   | Description                  |
|-----------|--------|------------------------------|
| expected  | number | The value to compare against |

## Returns

Expand table

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

## Description

The `toBeGreaterThanOrEqual()` method performs a numeric comparison using the `>=` operator. Both values must be numbers, or the assertion will fail.

## 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(5).toBeGreaterThanOrEqual(3);
  expect(5).toBeGreaterThanOrEqual(5); // Equal values pass
  expect(10.5).toBeGreaterThanOrEqual(10);
  expect(0).toBeGreaterThanOrEqual(-1);
  expect(-1).toBeGreaterThanOrEqual(-5);
}
```
