File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -333,6 +333,27 @@ suite('Validation Tests', () => {
333333
334334 } ) ;
335335
336+ describe ( 'Test with no schemas' , ( ) => {
337+ function parseSetup ( content : string ) {
338+ const testTextDocument = setupTextDocument ( content ) ;
339+ return languageService . doValidation ( testTextDocument , true ) ;
340+ }
341+
342+ it ( 'Duplicate properties are reported' , done => {
343+ languageService . configure ( {
344+ validate : true ,
345+ isKubernetes : true
346+ } ) ;
347+ const content = 'kind: a\ncwd: b\nkind: c' ;
348+ const validator = parseSetup ( content ) ;
349+ validator . then ( function ( result ) {
350+ assert . equal ( result . length , 2 ) ;
351+ assert . equal ( result [ 1 ] . message , 'duplicate key' ) ;
352+ } ) . then ( done , done ) ;
353+
354+ } ) ;
355+ } ) ;
356+
336357 describe ( 'Test with custom schemas' , function ( ) {
337358 function parseSetup ( content : string ) {
338359 const testTextDocument = setupTextDocument ( content ) ;
You can’t perform that action at this time.
0 commit comments