mirror of https://github.com/sveltejs/svelte
parent
4206127f1f
commit
55f3ba1a30
@ -0,0 +1,21 @@
|
||||
import * as assert from 'assert';
|
||||
|
||||
export default {
|
||||
data: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: 100,
|
||||
height: 100
|
||||
},
|
||||
html: `<svg><rect x="0" y="0" width="100" height="100"></rect></svg>`,
|
||||
test ( component, target ) {
|
||||
const svg = target.querySelector( 'svg' );
|
||||
const rect = target.querySelector( 'rect' );
|
||||
|
||||
assert.equal( svg.namespaceURI, 'http://www.w3.org/2000/svg' );
|
||||
assert.equal( rect.namespaceURI, 'http://www.w3.org/2000/svg' );
|
||||
|
||||
component.set({ width: 150, height: 50 });
|
||||
assert.equal( target.innerHTML, `<svg><rect x="0" y="0" width="150" height="50"></rect></svg>` );
|
||||
}
|
||||
};
|
After Width: | Height: | Size: 80 B |
Loading…
Reference in new issue