Skip to content

Commit 6120070

Browse files
natemoo-regithub-actions[bot]
authored andcommitted
[ci] format
1 parent 801246b commit 6120070

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

packages/core/src/prompts/prompt.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,14 @@ export default class Prompt {
122122
return resolve(CANCEL_SYMBOL);
123123
}
124124

125-
this._abortSignal.addEventListener('abort', () => {
126-
this.state = 'cancel';
127-
this.close();
128-
}, { once: true });
125+
this._abortSignal.addEventListener(
126+
'abort',
127+
() => {
128+
this.state = 'cancel';
129+
this.close();
130+
},
131+
{ once: true }
132+
);
129133
}
130134

131135
const sink = new WriteStream(0);

packages/core/test/prompts/prompt.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,12 @@ describe('Prompt', () => {
253253
const abortController = new AbortController();
254254
abortController.abort();
255255

256-
const instance = new Prompt({ input, output, render: () => 'foo', signal: abortController.signal });
256+
const instance = new Prompt({
257+
input,
258+
output,
259+
render: () => 'foo',
260+
signal: abortController.signal,
261+
});
257262
instance.prompt();
258263

259264
expect(instance.state).to.equal('cancel');

0 commit comments

Comments
 (0)