diff --git a/packages/create-astro/test/project-name.test.js b/packages/create-astro/test/project-name.test.js index 74196a35ae..8f14969e28 100644 --- a/packages/create-astro/test/project-name.test.js +++ b/packages/create-astro/test/project-name.test.js @@ -56,8 +56,8 @@ describe('project name', async () => { assert.equal(context.projectName, 'foobar'); }); - it('blank space', async () => { - const context = { projectName: '', cwd: '', prompt: () => ({ name: 'foobar' }) }; + it('head and tail blank spaces should be trimed', async () => { + const context = { projectName: '', cwd: '', prompt: () => ({ name: ' foobar ' }) }; await projectName(context); assert.equal(context.cwd, 'foobar'); assert.equal(context.projectName, 'foobar');