Skip to content

Commit 05d4a9e

Browse files
committed
add tests
1 parent aa2654d commit 05d4a9e

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
{#if true}
3+
<g>
4+
<rect x="20" y="10" width="50" height="50" fill="yellow"/>
5+
</g>
6+
{:else}
7+
<div>lol</div>
8+
{/if}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { test, ok } from '../../test';
2+
3+
export default test({
4+
html: `<svg height="200px" viewBox="0 0 100 100" width="200px"><g><rect fill="yellow" height="50" width="50" x="20" y="10"></rect></g></svg>`,
5+
test({ assert, target }) {
6+
const g = target.querySelector('g');
7+
const rect = target.querySelector('rect');
8+
ok(g);
9+
ok(rect);
10+
11+
assert.equal(g.namespaceURI, 'http://www.w3.org/2000/svg');
12+
assert.equal(rect.namespaceURI, 'http://www.w3.org/2000/svg');
13+
}
14+
});
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<script>
2+
import Child from "./Child.svelte";
3+
</script>
4+
5+
<svg viewBox="0 0 100 100" width="200px" height="200px">
6+
<Child />
7+
</svg>

0 commit comments

Comments
 (0)