const assert = function(condition, message) {
if (!condition)
throw Error('Assert failed: ' + (message || ''));
};
assert(1 === 1); // Executes without problem
assert(false, 'Expected true');
// Yields 'Error: Assert failed: Expected true' in console
//Code prints "Hello, ${username}!" and defaults to Jasmine if no username
//is provided
const hello = require('../hello.js');
const assert = require('assert'); //must require the assert
describe("hello", function(){
it("should return custom message when name is specified", function(){
assert.strictEqual(hello("Jasmine"), "Hello, Jasmine!");
});
});
assert.strictEqual(hello("Jasmine"), "Hello, Jasmine!");