Skip to content

Commit

Permalink
tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dummdidumm committed Dec 12, 2024
1 parent 6a6ffe7 commit def666f
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"code": "js_parse_error",
"message": "Unexpected token\nhttps://svelte.dev/e/js_parse_error",
"filename": "(unknown)",
"start": {
"line": 1,
"column": 6,
"character": 6
},
"end": {
"line": 1,
"column": 6,
"character": 6
},
"position": [
6,
6
],
"frame": "1: <div>{}</div>\n ^\n2: \n3: <div attr={}></div>"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{ svelteHTML.createElement("div", {});; }

{ svelteHTML.createElement("div", {"attr": ,}); }
{ svelteHTML.createElement("div", { ,}); }

{ const $$_tnenopmoC0C = __sveltets_2_ensureComponent(Component); new $$_tnenopmoC0C({ target: __sveltets_2_any(), props: {"prop": ,}}); Component}
{ const $$_tnenopmoC0C = __sveltets_2_ensureComponent(Component); new $$_tnenopmoC0C({ target: __sveltets_2_any(), props: { ,}}); Component}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div>{}</div>

<div attr={}></div>
<div {}></div>

<Component prop={}></Component>
<Component {}></Component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"code": "element_invalid_closing_tag",
"message": "`</div>` attempted to close an element that was not open\nhttps://svelte.dev/e/element_invalid_closing_tag",
"filename": "(unknown)",
"start": {
"line": 3,
"column": 0,
"character": 20
},
"end": {
"line": 3,
"column": 0,
"character": 20
},
"position": [
20,
20
],
"frame": "1: <div>\n2: {#if foo}\n3: </div>\n ^\n4: \n5: <div>"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{ svelteHTML.createElement("div", {});
if(foo){
} }

{ svelteHTML.createElement("div", {});
for(let item of __sveltets_2_ensureArray(array)){
if(i){
}} }

{ const $$_tnenopmoC0C = __sveltets_2_ensureComponent(Component); const $$_tnenopmoC0 = new $$_tnenopmoC0C({ target: __sveltets_2_any(), props: {f:() => { async ()/*Ωignore_positionΩ*/ => {
};return __sveltets_2_any(0)},}});/*Ωignore_startΩ*/const {f} = $$_tnenopmoC0.$$prop_def;/*Ωignore_endΩ*/
Component}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div>
{#if foo}
</div>

<div>
{#each array as item}
{#if i}
</div>

<Component>
{#snippet f}
</Component>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"code": "expected_token",
"message": "Expected token >\nhttps://svelte.dev/e/expected_token",
"filename": "(unknown)",
"start": {
"line": 3,
"column": 2,
"character": 24
},
"end": {
"line": 3,
"column": 2,
"character": 24
},
"position": [
24,
24
],
"frame": "1: <div>\n2: <Comp a={b}\n3: </div>\n ^\n4: \n5: <div>"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{ svelteHTML.createElement("div", {});
{ const $$_pmoC1C = __sveltets_2_ensureComponent(Comp); new $$_pmoC1C({ target: __sveltets_2_any(), props: { "a":b,}});
} }

{ svelteHTML.createElement("div", {});
{ svelteHTML.createElement("span", { "a":b,});} }
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<div>
<Comp a={b}
</div>

<div>
<span a={b}
</div>

0 comments on commit def666f

Please sign in to comment.