diff options
author | 2022-10-26 10:13:56 -0500 | |
---|---|---|
committer | 2022-10-26 10:13:56 -0500 | |
commit | 04083762810a1a9e078a7e68edab945c8063b1ab (patch) | |
tree | 784baa969ba4f3a68f3420dc909135359a58f3cd /packages/create-astro/test | |
parent | ddf2f8390e8dcc64b44636524bdcddae977779f4 (diff) | |
download | astro-04083762810a1a9e078a7e68edab945c8063b1ab.tar.gz astro-04083762810a1a9e078a7e68edab945c8063b1ab.tar.zst astro-04083762810a1a9e078a7e68edab945c8063b1ab.zip |
[Create Astro] Improved prompts, template handling, Houston (#5088)
* feat(create-astro): add houston, improve prompts
* refactor(create-astro): move to giget
* chore: add changeset
* chore: update lockfile
* test(create-astro): update tests to match new output
* chore: prefer named functions
* fix: update template prompt
* fix: update typescript message
* chore: add explicit --skip-houston flag
* test(create-astro): skip flaky typescript test
Co-authored-by: Nate Moore <nate@astro.build>
Diffstat (limited to 'packages/create-astro/test')
-rw-r--r-- | packages/create-astro/test/typescript-step.test.js.skipped (renamed from packages/create-astro/test/typescript-step.test.js) | 3 | ||||
-rw-r--r-- | packages/create-astro/test/utils.js | 6 |
2 files changed, 5 insertions, 4 deletions
diff --git a/packages/create-astro/test/typescript-step.test.js b/packages/create-astro/test/typescript-step.test.js.skipped index 57371fec1..d9281b21d 100644 --- a/packages/create-astro/test/typescript-step.test.js +++ b/packages/create-astro/test/typescript-step.test.js.skipped @@ -98,7 +98,8 @@ describe('[create-astro] select typescript', function () { stdout.on('data', (chunk) => { onStdout(chunk); if (!wrote && chunk.includes(PROMPT_MESSAGES.typescript)) { - stdin.write('\x1B\x5B\x42\x0D'); + // Enter (strict is default) + stdin.write('\n'); wrote = true; } if (chunk.includes(PROMPT_MESSAGES.typescriptSucceed)) { diff --git a/packages/create-astro/test/utils.js b/packages/create-astro/test/utils.js index 0a83a4f59..dc161163b 100644 --- a/packages/create-astro/test/utils.js +++ b/packages/create-astro/test/utils.js @@ -36,13 +36,13 @@ export function promiseWithTimeout(testFn) { export const PROMPT_MESSAGES = { directory: 'Where would you like to create your new project?', - template: 'Which template would you like to use?', + template: 'How would you like to setup your new project?', typescript: 'How would you like to setup TypeScript?', - typescriptSucceed: 'Next steps', + typescriptSucceed: 'next', }; export function setup(args = []) { - const { stdout, stdin } = execa('../create-astro.mjs', [...args, '--dryrun'], { cwd: testDir }); + const { stdout, stdin } = execa('../create-astro.mjs', [...args, '--skip-houston', '--dryrun'], { cwd: testDir }); return { stdin, stdout, |