-
-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support scoped package name, fix #236
- Loading branch information
Showing
2 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,4 +69,38 @@ describe('generator:app', () => { | |
assert.fileContent('.eslintignore', '**/templates\n'); | ||
}); | ||
}); | ||
|
||
describe('scoped name', () => { | ||
beforeEach(() => { | ||
return helpers.run(path.join(__dirname, '../app')).withPrompts({ | ||
name: '@yeoman/generator-temp', | ||
description: 'A node generator', | ||
homepage: 'http://yeoman.io', | ||
githubAccount: 'yeoman', | ||
authorName: 'The Yeoman Team', | ||
authorEmail: '[email protected]', | ||
authorUrl: 'http://yeoman.io', | ||
keywords: [], | ||
license: 'MIT' | ||
}); | ||
}); | ||
|
||
it('created and CD into a folder named like the generator', () => { | ||
assert.equal(path.basename(process.cwd()), 'generator-temp'); | ||
}); | ||
|
||
it('fills package.json with correct information', () => { | ||
// eslint-disable-next-line new-cap | ||
assert.JSONFileContent('package.json', { | ||
name: '@yeoman/generator-temp' | ||
}); | ||
}); | ||
|
||
it('fills the README with project data', () => { | ||
assert.fileContent('README.md', '# @yeoman/generator-temp'); | ||
assert.fileContent('README.md', 'npm install -g yo'); | ||
assert.fileContent('README.md', 'npm install -g @yeoman/generator-temp'); | ||
assert.fileContent('README.md', 'yo @yeoman/temp'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters