Skip to content

Commit

Permalink
Bump tape from 4.13.3 to 5.2.1 and pin run-parallel (#715)
Browse files Browse the repository at this point in the history
- Bump `tape` devDependency from 4.13.3 to 5.2.1
- Avoid `t.throws()`, fails on errors with non-configurable message
- Pin `run-parallel` to 1.1.10 for browser compatibility. Later
  versions depend on `queue-microtask` which uses arrow functions
  and promises.
  • Loading branch information
dependabot[bot] authored Mar 7, 2021
1 parent 3988b66 commit 14969c8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ updates:
- dependency-name: airtap
- dependency-name: nyc
- dependency-name: standard

# Pinned to 1.1.10 for browser compatibility (later versions depend
# on `queue-microtask` which uses arrow functions and promises).
- dependency-name: run-parallel
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@
"memdown": "^5.0.0",
"nyc": "^14.0.0",
"pinkie": "^2.0.4",
"run-parallel": "^1.1.9",
"run-parallel": "1.1.10",
"run-series": "^1.1.8",
"safe-buffer": "^5.1.0",
"simple-concat": "^1.0.0",
"sinon": "^7.4.2",
"standard": "^15.0.0",
"tape": "^4.7.0",
"tape": "^5.2.2",
"trickle": "0.0.2"
},
"hallmark": {
Expand Down
21 changes: 19 additions & 2 deletions test/init-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@ var memdown = require('memdown')
module.exports = function (test, testCommon) {
test('Init & open(): levelup()', function (t) {
t.is(typeof levelup, 'function')
t.is(levelup.length, 3) // db, options & callback arguments
t.throws(levelup, /^InitializationError/) // no db

// db, options & callback arguments
t.is(levelup.length, 3)

// no db
throws(t, levelup, function (err) {
return /^InitializationError/.test(err)
})

t.end()
})

Expand Down Expand Up @@ -107,3 +114,13 @@ module.exports = function (test, testCommon) {
})
})
}

function throws (t, fn, verify) {
try {
fn()
} catch (err) {
return verify(err)
}

t.fail('did not throw')
}

0 comments on commit 14969c8

Please sign in to comment.