pull/464/head
Conduitry 8 years ago
parent 4fe03652f8
commit 86035c3f99

@ -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( '<div></div>', {
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 } ] );
});
});

Loading…
Cancel
Save