Like https://github.com/staltz/html-looks-like to compare expected (snapshot) and actual value.
Maybe check if the function is binary to tell apart from data-driven testing
const isPrime = n => ...
snapshot(isPrime, 1, 2, 3)
// data-drive, because isPrime is unary?
const htmlLooksLike = require('html-looks-like')
snapshot(htmlLooksLike, someText)
// comparator function because binary function and single value
Like
https://github.com/staltz/html-looks-like
to compare expected (snapshot) and actual value. Maybe check if the function is binary to tell apart from data-driven testing