Skip to content

Commit

Permalink
use ES6 classes in tests to please TypeScript
Browse files Browse the repository at this point in the history
Otherwise TypeScript doesn't see that Test inherits
AbstractLevelDOWN, if defined like this:

```
function Test (location) {
  AbstractLevelDOWN.call(this, location)
}

util.inherits(Test, AbstractLevelDOWN)
```

And will complain about AbstractLevelDOWN methods being undefined on
Test.
  • Loading branch information
vweevers committed Feb 8, 2018
1 parent c2f400e commit 38b3706
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 236 deletions.
2 changes: 2 additions & 0 deletions abstract/put-get-del-test.js
@@ -1,3 +1,5 @@
'use strict'

var db
const verifyNotFoundError = require('./util').verifyNotFoundError
const testBuffer = Buffer.from('testbuffer')
Expand Down

0 comments on commit 38b3706

Please sign in to comment.