()
| 107 | |
| 108 | // to be executed after save ("line B" below) |
| 109 | const verify = () => { |
| 110 | new Demo('test_state_key').load().then((demo) => { |
| 111 | t.is(demo.state.y, 4); |
| 112 | t.end(); |
| 113 | }) |
| 114 | .catch((err) => { |
| 115 | t.fail(`ERR6: ${err}`); |
| 116 | }); |
| 117 | }; |
| 118 | |
| 119 | new Demo('test_state_key').load().then((demo) => { |
| 120 | const state = demo.state; |