This is documentation for the next version of Grafana k6 documentation. For the latest stable release, go to the latest version.
toBeGreaterThanOrEqual()
The toBeGreaterThanOrEqual() method asserts that a numeric value is greater than or equal to another value.
Syntax
expect(actual).toBeGreaterThanOrEqual(expected);
expect(actual).not.toBeGreaterThanOrEqual(expected);Parameters
Returns
Description
The toBeGreaterThanOrEqual() method performs a numeric comparison using the >= operator. Both values must be numbers, or the assertion will fail.
Usage
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);
}

