mirror of
https://github.com/withastro/astro.git
synced 2025-02-17 22:44:24 -05:00
Update project-name.test.js (#10766)
head and tail blank spaces should be trimed
This commit is contained in:
parent
5cb7d2aed8
commit
335879218e
1 changed files with 2 additions and 2 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Reference in a new issue