Permalink
Browse files

Adds failing test

  • Loading branch information...
b-gran committed Jul 23, 2017
1 parent a893c2c commit e9a31302e91d020ca7f6b462113bd1e70ff03741
Showing with 13 additions and 0 deletions.
  1. +13 −0 tests/state.js
View
@@ -8,4 +8,17 @@ describe("State", () => {
const c = State.of(3)
assert.strictEqual(3, State.eval(c, null))
})
it("simple_bind", () => {
const c = State.of(3).chain(x => State.of(x + 5))
assert.deepEqual(
{ value: 8, state: 's' },
State.run(c, 's'))
assert.deepEqual(
{ value: 8, state: 's' },
c.run('s'))
})
})

0 comments on commit e9a3130

Please sign in to comment.