diff --git a/test/validator/index.js b/test/validator/index.js index 9b88441f34ee..8ebe0be2943a 100644 --- a/test/validator/index.js +++ b/test/validator/index.js @@ -69,4 +69,19 @@ describe( 'validate', () => { }); }, /options\.name must be a valid identifier/ ); }); + + it( 'warns if options.name is not capitalised', () => { + const warnings = []; + svelte.compile( '
', { + name: 'lowercase', + onwarn ( warning ) { + warnings.push({ + message: warning.message, + pos: warning.pos, + loc: warning.loc + }); + } + }); + assert.deepEqual( warnings, [ { message: 'options.name should be capitalised', pos: undefined, loc: undefined } ] ); + }); });