Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit 8e963c3

Browse files
committed
Remove process.emitWarning because it breaks AppVeyor builds
See Level/leveldown#660
1 parent 895e007 commit 8e963c3

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

test/common.js

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
var warned = false
2-
31
function testCommon (options) {
42
var factory = options.factory
53
var test = options.test
6-
var clear = !!options.clear
74

85
if (typeof factory !== 'function') {
96
throw new TypeError('factory must be a function')
@@ -13,15 +10,6 @@ function testCommon (options) {
1310
throw new TypeError('test must be a function')
1411
}
1512

16-
if (!clear && !warned) {
17-
warned = true
18-
warn(
19-
'A next major release of abstract-leveldown will make support of ' +
20-
'clear() mandatory. Prepare by enabling the tests and implementing a ' +
21-
'custom _clear() if necessary. See the README for details.'
22-
)
23-
}
24-
2513
return {
2614
test: test,
2715
factory: factory,
@@ -32,15 +20,7 @@ function testCommon (options) {
3220
errorIfExists: options.errorIfExists !== false,
3321
snapshots: options.snapshots !== false,
3422
seek: options.seek !== false,
35-
clear: clear
36-
}
37-
}
38-
39-
function warn (msg) {
40-
if (typeof process !== 'undefined' && process && process.emitWarning) {
41-
process.emitWarning(msg)
42-
} else if (typeof console !== 'undefined' && console && console.warn) {
43-
console.warn('Warning: ' + msg)
23+
clear: !!options.clear
4424
}
4525
}
4626

0 commit comments

Comments
 (0)