Commit 22e554d
committed
✅ Add
We have [logic][1] that tries to differentiate between:
- a create op that is incorrectly trying to create a `Doc` that already
exists
- a create op that has already been committed, and has been resubmitted
(possibly because the connection closed before the ack was received)
The latter case is [not currently covered by tests][2].
This change adds a test to cover this branch, and a second similar test
which explains why #657 was not a
viable change (and correctly fails for that case).
[1]: https://github.com/share/sharedb/blob/7b20313ded4c302b9416cc6c7821694a7fa491b8/lib/submit-request.js#L105-L121
[2]: https://coveralls.io/builds/67552613/source?filename=lib%2Fsubmit-request.js#L117OP_ALREADY_SUBMITTED test for create ops1 parent 7b20313 commit 22e554d
1 file changed
+49
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
249 | 298 | | |
250 | 299 | | |
251 | 300 | | |
| |||
0 commit comments