From: Cheng Zhao Date: Sun, 15 Dec 2013 08:32:49 +0000 (+0800) Subject: Fix capturePage() spec. X-Git-Tag: v0.8.0~4^2~35 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=cfeeec37eb219d0214f97766284e30e2163fcb8c;p=electron.git Fix capturePage() spec. --- diff --git a/spec/api-browser-window-spec.coffee b/spec/api-browser-window-spec.coffee index bcf308a2..c6a7283f 100644 --- a/spec/api-browser-window-spec.coffee +++ b/spec/api-browser-window-spec.coffee @@ -77,10 +77,11 @@ describe 'browser-window module', -> w.close() describe 'BrowserWindow.capturePage(rect, callback)', -> - it 'calls the callback with a Buffer', -> + it 'calls the callback with a Buffer', (done) -> w = new BrowserWindow(show: false) w.capturePage {x: 0, y: 0, width: 100, height: 100}, (image) -> - assert.equal image.constructor.name, 'SlowBuffer' + assert.equal image.constructor.name, 'Buffer' + done() w.close() describe 'beforeunload handler', ->