Skip to content

Commit f78baac

Browse files
committed
test fix: 'returns neither a string nor a Buffer' test now supports async error
1 parent 259885c commit f78baac

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/index.coffee

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@ describe 'plugin: gulp-transform', ->
3232

3333
context 'returns neither a string nor a Buffer', ->
3434

35-
it 'throws PluginError', ->
36-
err -> transform((content) -> 42).write buffered()
35+
it 'throws PluginError', (done) ->
36+
t = transform((content) -> 42)
37+
t.on 'error', (err) ->
38+
done()
39+
t.on 'data', () ->
40+
done new Error('expected PluginError')
41+
t.write buffered()
3742

3843
context 'returns a Buffer or string', ->
3944
[fn, file] = [null, null]

0 commit comments

Comments
 (0)