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.
31 lines
527 B
31 lines
527 B
4 years ago
|
export default {
|
||
|
html: `
|
||
|
<input>
|
||
|
`,
|
||
|
|
||
|
ssrHtml: `
|
||
|
<input>
|
||
|
`,
|
||
|
|
||
|
async test({ assert, component, target, window }) {
|
||
|
const input = target.querySelector('input');
|
||
|
assert.equal(input.value, '');
|
||
|
|
||
|
component.x = null;
|
||
|
assert.equal(input.value, '');
|
||
|
|
||
|
component.x = undefined;
|
||
|
assert.equal(input.value, '');
|
||
|
|
||
|
component.x = 'string';
|
||
|
component.x = undefined;
|
||
|
assert.equal(input.value, '');
|
||
|
|
||
|
component.x = 0;
|
||
|
assert.equal(input.value, '0');
|
||
|
|
||
|
component.x = undefined;
|
||
|
assert.equal(input.value, '');
|
||
|
},
|
||
|
};
|