Commit 68eadaa
authored
test(editor): add tests for camera state reset on dispose (tldraw#8418)
Adds unit tests for the camera state reset on dispose behavior
introduced in tldraw#8396. Verifies that disposing the editor while the camera
is in `'moving'` state correctly resets it to `'idle'`, and that
disposing while already idle is a no-op.
### Change type
- [x] `other`
### Test plan
```bash
cd packages/tldraw && yarn test run -t "camera state on dispose"
```
- [x] Unit tests
### Code changes
| Section | LOC change |
| ------- | ---------- |
| Tests | +16 / -0 |1 parent 0d7280e commit 68eadaa
1 file changed
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
0 commit comments