Skip to content
On this page

Empower Your Test Results with AI-Powered Insights ->

notEquals

Checks if actual value is not equal to expected.

Syntax

js
notEquals(input)
  • input (string | number | boolean) - expected value

Usage

โœ… Correct Usage

js
notEquals('jon')

Examples

js
const { spec } = require('pactum');
const { notEquals } = require('pactum-matchers');

await spec()
  .get('https://randomuser.me/api')
  .expectJsonMatch({
    "results": [
      {
        "name": notEquals('jon'),
      }
    ]
  });

Released under the MIT License.