1//Code prints "Hello, ${username}!" and defaults to Jasmine if no username
2//is provided
3
4const hello = require('../hello.js');
5const assert = require('assert'); //must require the assert
6
7describe("hello", function(){
8it("should return custom message when name is specified", function(){
9 assert.strictEqual(hello("Jasmine"), "Hello, Jasmine!");
10 });
11});
12
13assert.strictEqual(hello("Jasmine"), "Hello, Jasmine!");
1function assert(condition, message) {
2 if (!condition) {
3 throw new Error(message || "Assertion failed");
4 }
5}
6