Skip to content

Commit

Permalink
fromPromise.toString test
Browse files Browse the repository at this point in the history
  • Loading branch information
rpominov committed Aug 31, 2016
1 parent fc522f5 commit ec3aa6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/toString.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @flow
/* global Promise */

import _test from 'lobot/test'
import Task from '../src'
Expand Down Expand Up @@ -57,3 +58,7 @@ test('ap', 1, t => {
const str = Task.of(x => x).ap(Task.of(1)).toString()
t.ok(/^Task\.of\([\s\S]+\)\.chain\(\.\.\)$/.test(str), `String "${str}" doesn't match regex`)
})

test('fromPromise', 1, t => {
t.equals(Task.fromPromise(Promise.resolve(2)).toString(), 'Task.fromPromise(..)')
})

0 comments on commit ec3aa6b

Please sign in to comment.