Browse code
finish tests
Showing 1 changed files
... | ... |
@@ -2,7 +2,6 @@ import StateContainer, {LensWrapper, lensTransformer} from '../src/state_contain |
2 | 2 |
import sinon from 'sinon'; |
3 | 3 |
|
4 | 4 |
import R from 'ramda'; |
5 |
-window.R = R; |
|
6 | 5 |
|
7 | 6 |
test("initial state setting works", () => { |
8 | 7 |
const container = new StateContainer({foo: 'bar'}); |
... | ... |
@@ -38,7 +37,7 @@ test("returned state cannot modify internal state", () => { |
38 | 37 |
expect(container.get('foo')).toBe('bar')//, "container state was not modified by output state"); |
39 | 38 |
}); |
40 | 39 |
|
41 |
-test("onUpdate listeners are fired when set is called", (assert) => { |
|
40 |
+test("onUpdate listeners are fired when set is called", () => { |
|
42 | 41 |
let container, listener; |
43 | 42 |
|
44 | 43 |
container = new StateContainer({foo: 'bar'}); |
... | ... |
@@ -69,8 +68,11 @@ test("onUpdate listeners are fired when setState is called", () => { |
69 | 68 |
|
70 | 69 |
container.setState({'foo': 'hi'}); |
71 | 70 |
|
72 |
- expect(JSON.stringify(listener.args[0])).toBe(JSON.stringify([{foo: 'bar'}, {foo: 'hi'}])); |
|
73 |
- |
|
71 |
+ expect(JSON.stringify(listener.args[0])) |
|
72 |
+ .toBe(JSON.stringify( |
|
73 |
+ [{ foo: 'bar' }, |
|
74 |
+ { foo: 'hi' }] |
|
75 |
+ )); |
|
74 | 76 |
}); |
75 | 77 |
|
76 | 78 |
test("recording works", () => { |