diff --git a/packages/language-server/tests/completions.spec.ts b/packages/language-server/tests/completions.spec.ts index 5bda73d90b..9323cef6f0 100644 --- a/packages/language-server/tests/completions.spec.ts +++ b/packages/language-server/tests/completions.spec.ts @@ -29,6 +29,136 @@ describe('Completions', async () => { `); }); + it('HTML tags and built-in components', async () => { + expect( + (await requestCompletionList('fixture.vue', 'vue', ``)).items.map(item => item.label) + ).toMatchInlineSnapshot(` + [ + "!DOCTYPE", + "html", + "head", + "title", + "base", + "link", + "meta", + "style", + "body", + "article", + "section", + "nav", + "aside", + "h1", + "h2", + "h3", + "h4", + "h5", + "h6", + "header", + "footer", + "address", + "p", + "hr", + "pre", + "blockquote", + "ol", + "ul", + "li", + "dl", + "dt", + "dd", + "figure", + "figcaption", + "main", + "div", + "a", + "em", + "strong", + "small", + "s", + "cite", + "q", + "dfn", + "abbr", + "ruby", + "rb", + "rt", + "rp", + "time", + "code", + "var", + "samp", + "kbd", + "sub", + "sup", + "i", + "b", + "u", + "mark", + "bdi", + "bdo", + "span", + "br", + "wbr", + "ins", + "del", + "picture", + "img", + "iframe", + "embed", + "object", + "param", + "video", + "audio", + "source", + "track", + "map", + "area", + "table", + "caption", + "colgroup", + "col", + "tbody", + "thead", + "tfoot", + "tr", + "td", + "th", + "form", + "label", + "input", + "button", + "select", + "datalist", + "optgroup", + "option", + "textarea", + "output", + "progress", + "meter", + "fieldset", + "legend", + "details", + "summary", + "dialog", + "script", + "noscript", + "canvas", + "data", + "hgroup", + "menu", + "Transition", + "TransitionGroup", + "KeepAlive", + "Teleport", + "Suspense", + "component", + "slot", + "template", + "fixture", + ] + `); + }); + it('Directives', async () => { await requestCompletionItem('fixture.vue', 'vue', ``, 'v-html'); await requestCompletionItem('fixture.vue', 'vue', ``, 'v-cloak');