function check_error(fn, message) {
	let error;

	try {
		fn();
	} catch (e) {
		error = /** @type {Error} */ (e);
	}

	assert.equal(error?.message, message);
}
@param {() => void} fn
@param {string} message