var referee = require('referee'); var assert = referee.assert; var x = { a: 1, b: 2 }; var y = { a: 1, b: 2 }; assert.same(x, y); // passes
var referee = require('referee'); var assert = referee.assert; var x = { a: 1, b: 2 }; var y = { a: 1, b: 3 }; assert.same(x, y); // fails with an AssertionErrorIn this example, we have two objects `x` and `y` that have different property values for the `b` property. We use `assert.same` to check if they are the same, but the assertion fails with an `AssertionError` because the objects are not equal. The `referee` library is a popular assertion library for JavaScript, often used in combination with testing frameworks like Mocha or Jasmine. It provides a range of assertion methods to write more expressive tests.