Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve test snapshots #2468

Merged
merged 2 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/tricky-onions-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marko/runtime-tags": patch
---

Fix issue concatinating effects in html writer.
Original file line number Diff line number Diff line change
@@ -1,4 +0,0 @@
# Render "Error"
```html

```
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# Emit error
Error: Cannot use $signal in a server render.


# Render "Error"
```html

```

# Mutations
```

Error: Cannot use $signal in a server render.
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Render {}
# Render
```html
<button>
+
Expand All @@ -9,9 +9,10 @@
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<button>
+
Expand All @@ -22,9 +23,10 @@ container.querySelector("button").click()
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<button>
+
Expand All @@ -35,14 +37,15 @@ container.querySelector("button").click()
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<button>
+
</button>
<span>
3 was 2
</span>
```
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Render {}
# Render
```html
<button>
+
Expand All @@ -10,13 +10,13 @@

# Mutations
```
inserted button0, span1
INSERT button, span
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<button>
+
Expand All @@ -28,14 +28,14 @@ container.querySelector("button").click()

# Mutations
```
span1/#text2: "‍" => "0"
span1/#text0: "0" => "1"
UPDATE span/#text2 "‍" => "0"
UPDATE span/#text0 "0" => "1"
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<button>
+
Expand All @@ -47,14 +47,14 @@ container.querySelector("button").click()

# Mutations
```
span1/#text2: "0" => "1"
span1/#text0: "1" => "2"
UPDATE span/#text2 "0" => "1"
UPDATE span/#text0 "1" => "2"
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<button>
+
Expand All @@ -66,6 +66,6 @@ container.querySelector("button").click()

# Mutations
```
span1/#text2: "1" => "2"
span1/#text0: "2" => "3"
UPDATE span/#text2 "1" => "2"
UPDATE span/#text0 "2" => "3"
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Render {}
# Render
```html
<button>
+
Expand All @@ -9,9 +9,10 @@
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<button>
+
Expand All @@ -22,9 +23,10 @@ container.querySelector("button").click()
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<button>
+
Expand All @@ -35,14 +37,15 @@ container.querySelector("button").click()
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<button>
+
</button>
<span>
3 was 2
</span>
```
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Render {}
# Render
```html
<html>
<head />
Expand All @@ -22,15 +22,11 @@
</html>
```

# Mutations
```

# Render
```js
container.querySelector("button").click();
```


# Render
container.querySelector("button").click()

```html
<html>
<head />
Expand All @@ -56,14 +52,14 @@ container.querySelector("button").click()

# Mutations
```
#document/html0/body1/span2/#text4: "‍" => "0"
#document/html0/body1/span2/#text0: "0" => "1"
UPDATE html/body/span/#text2 "‍" => "0"
UPDATE html/body/span/#text0 "0" => "1"
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<html>
<head />
Expand All @@ -89,14 +85,14 @@ container.querySelector("button").click()

# Mutations
```
#document/html0/body1/span2/#text4: "0" => "1"
#document/html0/body1/span2/#text0: "1" => "2"
UPDATE html/body/span/#text2 "0" => "1"
UPDATE html/body/span/#text0 "1" => "2"
```


# Render
container.querySelector("button").click()

# Render
```js
container.querySelector("button").click();
```
```html
<html>
<head />
Expand All @@ -122,6 +118,6 @@ container.querySelector("button").click()

# Mutations
```
#document/html0/body1/span2/#text4: "1" => "2"
#document/html0/body1/span2/#text0: "2" => "3"
UPDATE html/body/span/#text2 "1" => "2"
UPDATE html/body/span/#text0 "2" => "3"
```
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Render "End"
# Render End
```html
<button>
+
</button>
<span>
0 was ‍
</span>
```
```
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Write
```html
<button>+</button><!--M_*0 #button/0--><span>0<!--M_*0 #text/1--> was <!>&zwj;<!--M_*0 #text/2--></span><script>WALKER_RUNTIME("M")("_");M._.r=[_=>(_.a={0:{clickCount:0}}),0,"__tests__/template.marko_0_clickCount",0];M._.w()</script>
```


# Render "End"
# Render End
```html
<html>
<head />
Expand All @@ -28,19 +29,19 @@

# Mutations
```
inserted #document/html0
inserted #document/html0/head0
inserted #document/html0/body1
inserted #document/html0/body1/button0
inserted #document/html0/body1/button0/#text0
inserted #document/html0/body1/#comment1
inserted #document/html0/body1/span2
inserted #document/html0/body1/span2/#text0
inserted #document/html0/body1/span2/#comment1
inserted #document/html0/body1/span2/#text2
inserted #document/html0/body1/span2/#comment3
inserted #document/html0/body1/span2/#text4
inserted #document/html0/body1/span2/#comment5
inserted #document/html0/body1/script3
inserted #document/html0/body1/script3/#text0
INSERT html
INSERT html/head
INSERT html/body
INSERT html/body/button
INSERT html/body/button/#text
INSERT html/body/#comment
INSERT html/body/span
INSERT html/body/span/#text0
INSERT html/body/span/#comment0
INSERT html/body/span/#text1
INSERT html/body/span/#comment1
INSERT html/body/span/#text2
INSERT html/body/span/#comment2
INSERT html/body/script
INSERT html/body/script/#text
```
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Render "End"
# Render End
```html
abcdefghijkl
```
```
Loading
Loading