Skip to content

Commit

Permalink
Update completions.spec.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Aug 25, 2024
1 parent e601874 commit 278a12e
Showing 1 changed file with 130 additions and 0 deletions.
130 changes: 130 additions & 0 deletions packages/language-server/tests/completions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,136 @@ describe('Completions', async () => {
`);
});

it('HTML tags and built-in components', async () => {
expect(
(await requestCompletionList('fixture.vue', 'vue', `<template><| /></template>`)).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', `<template><div v-ht|></div></template>`, 'v-html');
await requestCompletionItem('fixture.vue', 'vue', `<template><div v-cl|></div></template>`, 'v-cloak');
Expand Down

0 comments on commit 278a12e

Please sign in to comment.