Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
codetheweb committed Nov 9, 2023
1 parent fdca2ed commit ec70158
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/api-event-iterator.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import {on} from 'node:events';

export async function * asyncEventIteratorFromApi(api) {
for await (const [plan] of on(api, 'run')) {

for await (const [stateChange] of on(plan.status, 'stateChange')) {
for await (const plan of api.events('run')) {

Check failure on line 2 in lib/api-event-iterator.js

View workflow job for this annotation

GitHub Actions / Lint source files

Invalid loop. Its body allows only one iteration.
for await (const stateChange of plan.status.events('stateChange')) {
yield stateChange;

if (stateChange.type === 'end' || stateChange.type === 'interrupt') {
break;
}
}

// todo: support multiple runs (watch mode)

Check failure on line 11 in lib/api-event-iterator.js

View workflow job for this annotation

GitHub Actions / Lint source files

Comments should not begin with a lowercase character.
break;
}
}

0 comments on commit ec70158

Please sign in to comment.