| 260 | * @param {t.TestCase} tc |
| 261 | */ |
| 262 | export const testInsertAndDeleteEvents = tc => { |
| 263 | const { array0, users } = init(tc, { users: 2 }) |
| 264 | /** |
| 265 | * @type {Object<string,any>?} |
| 266 | */ |
| 267 | let event = null |
| 268 | array0.observe(e => { |
| 269 | event = e |
| 270 | }) |
| 271 | array0.insert(0, [0, 1, 2]) |
| 272 | t.assert(event !== null) |
| 273 | event = null |
| 274 | array0.delete(0) |
| 275 | t.assert(event !== null) |
| 276 | event = null |
| 277 | array0.delete(0, 2) |
| 278 | t.assert(event !== null) |
| 279 | event = null |
| 280 | compare(users) |
| 281 | } |
| 282 | |
| 283 | /** |
| 284 | * @param {t.TestCase} tc |