Skip to content

Commit 4e50268

Browse files
committed
chore: add test cases for slot rules
1 parent 711726c commit 4e50268

File tree

6 files changed

+62
-0
lines changed

6 files changed

+62
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { runTest } from '../../src/testUtils'
2+
3+
runTest(
4+
'Convert usage of slot before vue 2.6',
5+
'slot-attribute',
6+
'slot-attribute',
7+
'vue',
8+
'vue'
9+
)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { runTest } from '../../src/testUtils'
2+
3+
runTest(
4+
'remove normal element where default slot exist',
5+
'slot-default',
6+
'slot-default',
7+
'vue',
8+
'vue'
9+
)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<div class="hello">
3+
<base-layout>
4+
<p slot="content">2.5 slot attribute in slot</p>
5+
</base-layout>
6+
</div>
7+
</template>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<template>
2+
<div class="hello">
3+
<base-layout>
4+
<template v-slot:content><p >2.5 slot attribute in slot</p></template>
5+
</base-layout>
6+
</div>
7+
</template>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<template>
2+
<div class="hello">
3+
<base-layout>
4+
<p>Need delete</p>
5+
<p>Need delete</p>
6+
<h1>Need delete</h1>
7+
<div class="hello">
8+
<p>Need delete</p>
9+
</div>
10+
<template v-slot:default>
11+
<p>default A paragraph for the main content.</p>
12+
<p>default And another one.</p>
13+
</template>
14+
</base-layout>
15+
</div>
16+
</template>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<template>
2+
<div class="hello">
3+
<base-layout>
4+
5+
6+
7+
8+
<template v-slot:default>
9+
<p>default A paragraph for the main content.</p>
10+
<p>default And another one.</p>
11+
</template>
12+
</base-layout>
13+
</div>
14+
</template>

0 commit comments

Comments
 (0)