Skip to content

Commit

Permalink
Update project-name.test.js (#10766)
Browse files Browse the repository at this point in the history
head and tail blank spaces should be trimed
  • Loading branch information
aswind7 authored Apr 22, 2024
1 parent 5cb7d2a commit 3358792
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/create-astro/test/project-name.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 3358792

Please sign in to comment.