Complete the code to import the assert module in Node.js.
const assert = require('[1]');
The assert module is built-in in Node.js and is imported using require('assert').
Complete the code to assert that two values are strictly equal.
assert.[1](5, 5);
notEqual which checks for inequality.deepEqual which checks object structure.assert.strictEqual(a, b) checks that a and b are strictly equal (===).
Fix the error in the code to assert that a function throws an error.
assert.[1](() => { throw new Error('fail'); });
doesNotThrow which expects no error.strictEqual which compares values.assert.throws() checks that the function throws an error as expected.
Fill both blanks for deep equality and inequality assertions on objects.
assert.[1]({a: 1}, {a: 1}); // deep comparison assert.[2]({a: 1}, {a: 2}); // should pass
strictEqual for objects which compares references.ok which checks truthiness.deepEqual checks deep equality of objects, while notDeepEqual asserts they are not deeply equal.
Fill all three blanks to assert that a value is truthy, not equal to zero, and not strictly equal to 1.
assert.[1](value); // check truthy assert.[2](value, 0); // check not equal assert.[3](value, 1); // check not strictly equal
equal instead of notEqual.notEqual and notStrictEqual.ok asserts truthiness, notEqual asserts inequality, and notStrictEqual asserts strict inequality.