aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/nodeify-test.js
blob: 5aed758facaac791b9fad04a74c4e76f5f6e9588 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const assert = require('assert')
const nodeify = require('../../app/scripts/lib/nodeify')

describe('nodeify', function () {
  var obj = {
    foo: 'bar',
    promiseFunc: function (a) {
      var solution = this.foo + a
      return Promise.resolve(solution)
    },
  }

  it('should retain original context', function (done) {
    var nodified = nodeify(obj.promiseFunc).bind(obj)
    nodified('baz', function (err, res) {
      assert.equal(res, 'barbaz')
      done()
    })
  })
})
d-ports-gnome/commit/graphics/swfdec?h=gnome-3.24&id=885639adeade65884107043f6e389316ae2cd744'> - update to 0.6.8alexbl2008-08-072-5/+4 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-0/+1 * - Update to version 0.6.6 (security update)brix2008-05-093-22/+8 * The FreeBSD GNOME team is proud to annunce the release of GNOME 2.22.0 formarcus2008-03-244-42/+68 * - Remove USE_XLIB/USE_X_PREFIX/USE_XPM in favor of USE_XORGmiwi2008-03-231-2/+1 * - Remove USE_GETOPT_LONG which is a no-op since March 2007pav2008-03-201-1/+0 * - add a missing + so that new libraries are appended instead ofalexbl2007-12-201-1/+1 * - enable ffmpeg and mad when not using gstreameralexbl2007-12-192-5/+4 * - update to 0.5.5alexbl2007-12-193-8/+16 * - add a missing file to the pllistalexbl2007-10-261-0/+1 * - update swfdec and swfdec-mozilla to 0.5.3alexbl2007-10-233-6/+10 * - update to 0.5.2alexbl2007-09-073-6/+13 * - bump LIBVERSION [1]alexbl2007-08-072-4/+7 * - remove unnecessary USE_GSTREAMERalexbl2007-08-071-1/+0 * - update to 0.5.1 which adds support for OSSalexbl2007-08-063-8/+20 * Update swfdec and swfdec-plugin to 0.5.0.anholt2007-07-143-17/+21 * Reset rainer.alves@gmail.com by request due to current lack of time tolinimon2007-06-301-1/+1 * Update to 0.4.5 and fix packaging.anholt2007-06-213-5/+20 * Add missing dependency on gnomevfs2.anholt2007-05-301-1/+1 * Update swfdec's dependencies for ffmpeg-devel -> ffmpeg merge.anholt2007-05-261-1/+1 * Update swfdec to 0.4.4.anholt2007-05-262-7/+6 * - Welcome X.org 7.2 \o/.flz2007-05-201-0/+1 * Unbreak from my previous update.anholt2007-03-102-3/+5 * BROKEN: Incomplete pkg-plistkris2007-02-271-0/+2 * Update to 0.4.2. This update improves correctness in many ways.anholt2007-02-144-67/+29 * Use gstreamer 0.10 instead of 0.8ahze2007-02-121-2/+2 * Chase the GNOME X11BASE to LOCALBASE move, and fix the build with themarcus2006-10-142-6/+6