mirror of
https://github.com/wassname/generator-react-webpack.git
synced 2026-09-09 11:22:44 +08:00
Added automatic generation of components displayName property.
This commit is contained in:
@@ -47,6 +47,14 @@ describe('react-webpack:component', () => {
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should have its displayName set per default', (done) => {
|
||||
|
||||
createGeneratedComponent('mycomponent', 'css', () => {
|
||||
assert.fileContent('src/components/MycomponentComponent.js', `displayName = 'MycomponentComponent';`);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('Style', () => {
|
||||
|
||||
@@ -82,6 +82,7 @@ describe('Utilities:Yeoman', () => {
|
||||
path: 'src/components/my/component/',
|
||||
fileName: 'TestComponent.js',
|
||||
className: 'TestComponent',
|
||||
displayName: 'MyComponentTestComponent',
|
||||
suffix: '.js'
|
||||
},
|
||||
test: {
|
||||
|
||||
Reference in New Issue
Block a user