test_puglint_handler.vader
1 Before: 2 runtime ale_linters/pug/puglint.vim 3 4 After: 5 call ale#linter#Reset() 6 7 Execute(Regular errors should be handled): 8 AssertEqual 9 \ [ 10 \ { 11 \ 'lnum': 1, 12 \ 'col': 5, 13 \ 'type': 'E', 14 \ 'text': 'Static attribute "class" must be written as class literal', 15 \ }, 16 \ ], 17 \ ale_linters#pug#puglint#Handle(0, [ 18 \ '/tmp/vwYwsJA/233/test.pug:1:5 Static attribute "class" must be written as class literal', 19 \ ]) 20 21 Execute(syntax errors in the configuration file should be handled): 22 AssertEqual 23 \ [ 24 \ { 25 \ 'lnum': 1, 26 \ 'text': 'puglint configuration error (type :ALEDetail for more information)', 27 \ 'detail': join( 28 \ [ 29 \ 'undefined:2', 30 \ ' disallowClassAttributeWithStaticValue: true', 31 \ ' ^', 32 \ 'SyntaxError: Unexpected token d in JSON at position 4', 33 \ ' at JSON.parse (<anonymous>)', 34 \ ], 35 \ "\n" 36 \ ), 37 \ }, 38 \ ], 39 \ ale_linters#pug#puglint#Handle(0, [ 40 \ 'undefined:2', 41 \ ' disallowClassAttributeWithStaticValue: true', 42 \ ' ^', 43 \ 'SyntaxError: Unexpected token d in JSON at position 4', 44 \ ' at JSON.parse (<anonymous>)', 45 \ ])