summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/create-astro/test/project-name.test.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/create-astro/test/project-name.test.js b/packages/create-astro/test/project-name.test.js
index 74196a35a..8f14969e2 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');