UNPKG

331 BJavaScriptView Raw
1/**
2 * Imports
3 */
4
5import test from 'tape'
6import DeclarativePromise from '../src'
7
8/**
9 * Tests
10 */
11
12test('should work', ({deepEqual, end}) => {
13 function then () {}
14 const q = new DeclarativePromise({})
15 q.then(then)
16 deepEqual(q.toJSON(), {meta: {then: [{success: then, failure: undefined, meta: {then: []}}]}})
17 end()
18})