mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
tests
This commit is contained in:
parent
985d705ad2
commit
f3f4fdc4ac
1 changed files with 17 additions and 0 deletions
17
test/unit/mystreams.js
Normal file
17
test/unit/mystreams.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
var ReadTarball = require('../../lib/streams').ReadTarballStream
|
||||
|
||||
describe('mystreams', function() {
|
||||
it('should delay events', function(cb) {
|
||||
var test = new ReadTarball()
|
||||
test.abort()
|
||||
setTimeout(function() {
|
||||
test.abort = function() {
|
||||
cb()
|
||||
}
|
||||
test.abort = function() {
|
||||
throw new Error('fail')
|
||||
}
|
||||
}, 10)
|
||||
})
|
||||
})
|
||||
|
Loading…
Reference in a new issue