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/raw-mustaches/_config.js

21 lines
575 B

const ns = '<noscript></noscript>';
export default {
'skip-ssr': true,
data: {
raw: '<span><em>raw html!!!\\o/</span></em>'
},
html: `before${ns}<span><em>raw html!!!\\o/</span></em>${ns}after`,
test ( assert, component, target ) {
component.set({ raw: '' });
assert.equal( target.innerHTML, `before${ns}${ns}after` );
component.set({ raw: 'how about <strong>unclosed elements?' });
assert.equal( target.innerHTML, `before${ns}how about <strong>unclosed elements?</strong>${ns}after` );
component.destroy();
assert.equal( target.innerHTML, '' );
}
};