Grafana k6 provides an expect() function through the k6-testing library. It lets you write readable assertions such as toBe(), toContain(), toHaveLength(), and toBeTruthy(). According to the Grafana documentation, expect() wraps a value and returns an expectation object with assertion methods. It also supports both regular assertions and soft assertions.
Docs HERE
expect() vs expect.soft()
A regular expect() assertion fails immediately when the condition is not met. That can be useful when the current iteration should stop as soon as something is wrong.
For load testing, though, I often prefer expect.soft().
Soft assertions do not stop the test execution immediately. Instead, they mark the test as failed while allowing the script to continue running. That failed soft assertions can make k6 eventually exit with code 110, while still letting the test reach its normal end condition.

Why this style is useful
The nice thing about this approach is readability. These assertions almost document the API contract by themselves:
That line tells us three things:
The actual value is res.status.
The failure message is status should be 200.
The expected value is 200.
This is easier to scan than a large check() block when you have several response validations.
Conclusion
expect makes k6 scripts feel closer to modern JavaScript test code. For API load testing, expect.soft() is usually the more forgiving and informative option because it lets the test continue while still reporting assertion failures.
In short: use hard expect() when the iteration should stop immediately, and use expect.soft() when you want better failure visibility during the full load test run.
