This commit is contained in:
Simon Priet
2021-09-05 22:53:58 +02:00
commit 9e2991e668
17888 changed files with 1263126 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
const assert = require('assert')
// A better assert.error that allows an exact error message
module.exports = (fn, message) => {
const regexp = new RegExp(message.replace(/[-[\]/{}()*+?.\\^$|]/g, '\\$&'))
assert.throws(fn, regexp)
}