Skip to content

Commit 2db830b

Browse files
committed
- // timer-sync.ts
1 parent 32eb357 commit 2db830b

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

blog/2025-11-migrate-to-vitest/README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,6 @@ But not all timers are this simple.
466466
Sometimes the code works only with timer-based actions, but without additional promises. The following example increments a counter multiple times using only timeouts and intervals:
467467

468468
```ts
469-
// timer-sync.ts
470469
export function startSyncSequence(counter: { value: number }) {
471470
setTimeout(() => { counter.value++; }, 300);
472471
const interval = setInterval(() => {
@@ -507,7 +506,6 @@ It becomes even more interesting when timer callbacks contain asynchronous work
507506
In that case, `runAllTimers()` is no longer enough. The following example shows a typical pattern from real applications:
508507

509508
```ts
510-
// timer-async.ts
511509
export function startAsyncJob(): Promise<string> {
512510
return new Promise(resolve => {
513511
setTimeout(async () => {

0 commit comments

Comments
 (0)