Intentions

You have a greet function that should greet the user by their name. That's the intention behind it. And here's its implementation:
function greet(name: string) {
	return `Hello, ${name}!`
}
๐Ÿ‘จโ€๐Ÿ’ผ Now your job is to add an automated test for the greet function (you can put it in the same greet.ts file) so you can run npx tsx greet.ts any time you want to check whether that functions works as intended.
As a reminder, this is what any automated test comes down to:
// Run the code and get the *actual* result.
let result = code(...args)

// Compare the actual with the expected results.
if (result !== expected) {
	// Alert us if the two results don't match
	// as that likely means a bug in the code.
	throw new Error(`Expected "${expected}" but got ${result}`)
}
Remember that an automated test is a comparison between the actual and the expected values of the program.

Access Denied

You must login or register for the workshop to view the diff.

Check out this video to see how the diff tab works.