Commit 78a93cd
committed
fix(tests): ensure SaveMarkdownModal tests wait for async state updates
The tests were causing unhandled rejection errors because they weren't
waiting for the `finally` block's `setSaving(false)` to complete after
error handling. Updated waitFor assertions to also check that the save
button text returns to "Save" (from "Saving..."), ensuring all async
state updates are complete before the test ends and the component unmounts.1 parent 02eed05 commit 78a93cd
File tree
1 file changed
+10
-0
lines changed- src/__tests__/renderer/components
1 file changed
+10
-0
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| 381 | + | |
381 | 382 | | |
382 | 383 | | |
| 384 | + | |
| 385 | + | |
383 | 386 | | |
384 | 387 | | |
385 | 388 | | |
| |||
395 | 398 | | |
396 | 399 | | |
397 | 400 | | |
| 401 | + | |
398 | 402 | | |
399 | 403 | | |
| 404 | + | |
| 405 | + | |
400 | 406 | | |
401 | 407 | | |
402 | 408 | | |
| |||
521 | 527 | | |
522 | 528 | | |
523 | 529 | | |
| 530 | + | |
524 | 531 | | |
525 | 532 | | |
| 533 | + | |
526 | 534 | | |
527 | 535 | | |
528 | 536 | | |
| |||
544 | 552 | | |
545 | 553 | | |
546 | 554 | | |
| 555 | + | |
547 | 556 | | |
548 | 557 | | |
| 558 | + | |
549 | 559 | | |
550 | 560 | | |
551 | 561 | | |
| |||
0 commit comments