No results for

Powered byAlgolia
⚠️ This is archived documentation for v0.31. Go to the latest version

toBeGreaterThanOrEqual( expectedValue )

suggest edits

toBeGreaterThanOrEqual(expectedValue) is a comparison function that evaluates to true or false. It must be called in the chain after the t.expect(value) or .and(value).

toBeGreaterThanOrEqual is equivalent to received >= expected

When toBeGreaterThanOrEqual(expectedValue) evaluates to false, the chain is broken, and the test is marked as failed. When the chain is broken, further checks inside of the test are omitted.

ParameterTypeDescription
expectedValueanyThe expected value

Returns

TypeDescription
FunkFunk object

Example

import { describe } from 'https://jslib.k6.io/expect/0.0.4/index.js';
import http from 'k6/http';
export default function testSuite() {
describe('Basic API test', (t) => {
t.expect(5).toBeGreaterThanOrEqual(4); // true
t.expect(5).toBeGreaterThanOrEqual(5); // true
t.expect(5).toBeGreaterThanOrEqual(6); // false
})
}