diff --git a/.taprc b/.taprc deleted file mode 100644 index 835bdc7..0000000 --- a/.taprc +++ /dev/null @@ -1,2 +0,0 @@ -files: - - "test/**/*" diff --git a/index.js b/index.js index d0dab30..c20ceed 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,7 @@ const types = parse.types function safeRegex (re, opts) { if (!opts) opts = {} - const replimit = opts.limit ?? 25 + const replimit = opts.limit === undefined ? 25 : opts.limit /* c8 ignore next 2 */ if (isRegExp(re)) re = re.source diff --git a/package.json b/package.json index b518d26..218ee39 100644 --- a/package.json +++ b/package.json @@ -11,14 +11,14 @@ "devDependencies": { "@fastify/pre-commit": "^2.1.0", "standard": "^17.1.0", - "tap": "^18.7.2", + "tape": "^5.7.5", "tsd": "^0.31.0" }, "scripts": { "lint": "standard", "test": "npm run test:unit && npm run test:typescript", "test:typescript": "tsd", - "test:unit": "tap" + "test:unit": "tape test/*.js" }, "repository": { "type": "git", diff --git a/test/regex.js b/test/regex.js index c5a8aa2..4e2f6bf 100644 --- a/test/regex.js +++ b/test/regex.js @@ -1,7 +1,7 @@ 'use strict' const safe = require('../') -const { test } = require('tap') +const test = require('tape') const good = [ /\bOakland\b/,