@@ -970,6 +970,27 @@ describe('completions', () => {
970
970
expectContain ( completions , DisplayInfoKind . EVENT , [ '(click)' ] ) ;
971
971
} ) ;
972
972
973
+ it ( 'should return event completion for self closing tag' , ( ) => {
974
+ const { templateFile} = setup ( `<br />` , `` ) ;
975
+ templateFile . moveCursorToText ( `<br ¦` ) ;
976
+ const completions = templateFile . getCompletionsAtPosition ( ) ;
977
+ expectContain ( completions , DisplayInfoKind . EVENT , [ '(click)' ] ) ;
978
+ } ) ;
979
+
980
+ it ( 'should not return element completions in end tag' , ( ) => {
981
+ const { templateFile} = setup ( `<button ></button>` , `` ) ;
982
+ templateFile . moveCursorToText ( `</¦button>` ) ;
983
+ const completions = templateFile . getCompletionsAtPosition ( ) ;
984
+ expect ( completions ) . not . toBeDefined ( ) ;
985
+ } ) ;
986
+
987
+ it ( 'should not return element completions in between start and end tag' , ( ) => {
988
+ const { templateFile} = setup ( `<button></button>` , `` ) ;
989
+ templateFile . moveCursorToText ( `<button>¦</button>` ) ;
990
+ const completions = templateFile . getCompletionsAtPosition ( ) ;
991
+ expect ( completions ) . not . toBeDefined ( ) ;
992
+ } ) ;
993
+
973
994
it ( 'should return event completion with empty parens' , ( ) => {
974
995
const { templateFile} = setup ( `<button ()></button>` , `` ) ;
975
996
templateFile . moveCursorToText ( `<button (¦)>` ) ;
0 commit comments