diff --git a/src/index.mts b/src/index.mts index 2932a19..7be941f 100644 --- a/src/index.mts +++ b/src/index.mts @@ -401,6 +401,8 @@ export default createPrompt( if (summarized) { printToShell.push(summarized) + } else { + printToShell[printToShell.length - 1] += ` (answered, no preview)` } } diff --git a/test/normal.test.mts b/test/normal.test.mts index c523062..a1228ef 100644 --- a/test/normal.test.mts +++ b/test/normal.test.mts @@ -114,7 +114,7 @@ describe('table-multiple prompt [normal]', () => { await Promise.resolve() expect(getScreen()).toMatchInlineSnapshot([ - '"✔ What do you want?"', + '"✔ What do you want? (answered, no preview)"', ].join('\n')) await expect(answer).resolves.toHaveLength(2) @@ -197,7 +197,7 @@ describe('table-multiple prompt [normal]', () => { await Promise.resolve() expect(getScreen()).toMatchInlineSnapshot([ - '"✔ What do you want?"', + '"✔ What do you want? (answered, no preview)"', ].join('\n')) await expect(answer).resolves.toHaveLength(2)