From f35a55bd4f5c722a82326f351e1adb448b6f9476 Mon Sep 17 00:00:00 2001 From: bluwy Date: Fri, 22 Sep 2023 13:20:50 +0000 Subject: [PATCH] [ci] format --- packages/create-astro/src/actions/template.ts | 8 ++++---- packages/create-astro/test/template.test.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/create-astro/src/actions/template.ts b/packages/create-astro/src/actions/template.ts index eaebe2360..8d22e95b1 100644 --- a/packages/create-astro/src/actions/template.ts +++ b/packages/create-astro/src/actions/template.ts @@ -9,11 +9,11 @@ import { error, info, spinner, title } from '../messages.js'; export async function template( ctx: Pick ) { - if (!ctx.template && ctx.yes) ctx.template = 'basics'; + if (!ctx.template && ctx.yes) ctx.template = 'basics'; - if (ctx.template) { - await info('tmpl', `Using ${color.reset(ctx.template)}${color.dim(' as project template')}`); - } else { + if (ctx.template) { + await info('tmpl', `Using ${color.reset(ctx.template)}${color.dim(' as project template')}`); + } else { const { template: tmpl } = await ctx.prompt({ name: 'template', type: 'select', diff --git a/packages/create-astro/test/template.test.js b/packages/create-astro/test/template.test.js index cf6b45f77..aef7e1944 100644 --- a/packages/create-astro/test/template.test.js +++ b/packages/create-astro/test/template.test.js @@ -34,10 +34,10 @@ describe('template', () => { expect(fixture.hasMessage('Using blog as project template')).to.be.true; }); - it('minimal (--yes)', async () => { - const context = { template: 'minimal', cwd: '', dryRun: true, yes: true, prompt: () => {} }; - await template(context); + it('minimal (--yes)', async () => { + const context = { template: 'minimal', cwd: '', dryRun: true, yes: true, prompt: () => {} }; + await template(context); - expect(fixture.hasMessage('Using minimal as project template')).to.be.true; - }) + expect(fixture.hasMessage('Using minimal as project template')).to.be.true; + }); });