aboutsummaryrefslogtreecommitdiff
path: root/packages/create-astro/test/project-name.test.js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/create-astro/test/project-name.test.js')
-rw-r--r--packages/create-astro/test/project-name.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/create-astro/test/project-name.test.js b/packages/create-astro/test/project-name.test.js
index f297da076..a78207369 100644
--- a/packages/create-astro/test/project-name.test.js
+++ b/packages/create-astro/test/project-name.test.js
@@ -62,6 +62,15 @@ describe('project name', () => {
expect(context.projectName).to.eq('foobar');
});
+
+ it('blank space', async () => {
+ const context = { projectName: '', cwd: '', prompt: () => ({ name: 'foobar ' }) };
+ await projectName(context);
+
+ expect(context.cwd).to.eq('foobar');
+ expect(context.projectName).to.eq('foobar');
+ });
+
it('normalize', async () => {
const context = { projectName: '', cwd: '', prompt: () => ({ name: 'Invalid Name' }) };
await projectName(context);