1 | /**
|
2 | * Imports
|
3 | */
|
4 |
|
5 | import test from 'tape'
|
6 | import DeclarativePromise from '../src'
|
7 |
|
8 | /**
|
9 | * Tests
|
10 | */
|
11 |
|
12 | test('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 | })
|