Skip to content

Commit 42e2dfb

Browse files
chriskinsmanmarcbachmann
authored andcommitted
Add test to ensure that renderDelay will render after a specific time
1 parent 7dbc346 commit 42e2dfb

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ test('pdf.create(html, {directory: "/tmp"}).toBuffer(callback)', function (t) {
7474
})
7575
})
7676

77+
test('pdf.create(html, {renderDelay: 1000}).toBuffer(callback)', function (t) {
78+
t.plan(2)
79+
80+
pdf.create(html, {renderDelay: 1000}).toBuffer(function (err, pdf) {
81+
t.error(err)
82+
t.assert(Buffer.isBuffer(pdf), 'still returns after renderDelay')
83+
})
84+
})
85+
86+
7787
test('pdf.create(html[, options]).toStream(callback)', function (t) {
7888
t.plan(3)
7989

0 commit comments

Comments
 (0)