toBeGreaterThan()
The toBeGreaterThan() method asserts that a numeric value is greater than another value.
Syntax
expect(actual).toBeGreaterThan(expected);
expect(actual).not.toBeGreaterThan(expected);Parameters
Returns
Description
The toBeGreaterThan() 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.5.0/index.js';
export default function () {
expect(5).toBeGreaterThan(3);
expect(10.5).toBeGreaterThan(10);
expect(-1).toBeGreaterThan(-5);
expect(0).toBeGreaterThan(-1);
}

