mirror of https://github.com/sveltejs/svelte
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.
19 lines
741 B
19 lines
741 B
5 years ago
|
export default {
|
||
|
html: `<div> hello</div>
|
||
|
<div> hello </div>
|
||
|
<div> hello hello</div>`,
|
||
|
|
||
|
test({ assert, component, target }) {
|
||
|
var divList = target.querySelectorAll('div')
|
||
|
assert.equal( divList[0].textContent.charCodeAt( 0 ), 160 );
|
||
|
assert.equal( divList[1].textContent.charCodeAt( 0 ), 160 );
|
||
|
assert.equal( divList[1].textContent.charCodeAt( 6 ), 160 );
|
||
|
assert.equal( divList[1].textContent.charCodeAt( 7 ), 160 );
|
||
|
assert.equal( divList[2].textContent.charCodeAt( 0 ), 160 );
|
||
|
assert.equal( divList[2].textContent.charCodeAt( 6 ), 160 );
|
||
|
assert.equal( divList[2].textContent.charCodeAt( 7 ), 32 );//normal space
|
||
|
assert.equal( divList[2].textContent.charCodeAt( 8 ), 160 );
|
||
|
|
||
|
|
||
|
}
|
||
|
};
|