assert.notStrictEqual()

assert.notStrictEqual(actual, expected[, message])

Tests strict inequality as determined by the strict not equal operator ( !== ).

const assert = require('assert');

assert.notStrictEqual(1, 2);
  // OK

assert.notStrictEqual(1, 1);
  // AssertionError: 1 != 1

assert.notStrictEqual(1, '1');
  // OK

If the values are strictly equal, an AssertionError is thrown with a message property set equal to the value of the message parameter. If the message parameter is undefined, a default error message is assigned.

doc_Nodejs
2016-04-30 04:37:23
Comments
Leave a Comment

Please login to continue.