-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathglobal-bluebird-promise-spec.js
42 lines (37 loc) · 1.07 KB
/
global-bluebird-promise-spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*!
* promised-handlebars <https://github.com/nknapp/promised-handlebars>
*
* Copyright (c) 2015 Nils Knappmeier.
* Released under the MIT license.
*/
/* global after */
/* global before */
/* global describe */
// /* global xit */
// /* global xdescribe */
/* global it */
'use strict'
var promisedHandlebars = require('../')
var promiseName = 'global bluebird Promises'
// Chai Setup
var chai = require('chai')
var expect = chai.expect
describe('promised-handlebars:', function () {
before(function () {
global.Promise = require('bluebird')
this.Handlebars = promisedHandlebars(require('handlebars'))
})
after(function () {
Promise.noConflict()
delete this.Handlebars
})
describe('running with ' + promiseName, function () {
it('Handlebars.Promise.version should match bluebird package\'s semver', function () {
var bluebirdVersion = require('bluebird/package').version
expect(this.Handlebars.Promise.version).to.equal(bluebirdVersion)
})
})
describe('using ' + promiseName, function () {
require('./default-suite')()
})
})