Remove pFinally() tests, now implemented in promise-toolbox.

This commit is contained in:
Julien Fontanet 2016-03-29 18:05:32 +02:00
parent 3506be1a70
commit 2695941a3c

View File

@ -1,7 +1,6 @@
/* eslint-env mocha */
import expect from 'must'
import sinon from 'sinon'
// ===================================================================
@ -13,7 +12,6 @@ import {
formatXml,
generateToken,
parseSize,
pFinally,
pSettle
} from './utils'
@ -144,36 +142,6 @@ describe('parseSize()', function () {
// -------------------------------------------------------------------
describe('pFinally()', () => {
it('calls a callback on resolution', async () => {
const value = {}
const spy = sinon.spy()
await expect(
Promise.resolve(value)::pFinally(spy)
).to.resolve.to.equal(
value
)
expect(spy.callCount).to.equal(1)
})
it('calls a callback on rejection', async () => {
const reason = {}
const spy = sinon.spy()
await expect(
Promise.reject(reason)::pFinally(spy)
).to.reject.to.equal(
reason
)
expect(spy.callCount).to.equal(1)
})
})
// -------------------------------------------------------------------
describe('pSettle()', () => {
it('works with arrays', async () => {
const [