You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime/samples/svg/_config.js

23 lines
571 B

8 years ago
export default {
props: {
8 years ago
x: 0,
y: 0,
width: 100,
height: 100
},
8 years ago
html: `<svg><rect x="0" y="0" width="100" height="100"></rect></svg>`,
test({ assert, component, target }) {
8 years ago
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.width = 150;
component.height = 50;
8 years ago
assert.equal( target.innerHTML, `<svg><rect x="0" y="0" width="150" height="50"></rect></svg>` );
}
};