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.
22 lines
301 B
22 lines
301 B
5 years ago
|
let fulfil;
|
||
|
|
||
|
const promise = new Promise(f => {
|
||
|
fulfil = f;
|
||
|
});
|
||
|
|
||
|
export default {
|
||
|
props: {
|
||
|
promise
|
||
|
},
|
||
|
|
||
|
html: ``,
|
||
|
|
||
|
async test({ assert, component, target }) {
|
||
|
component.condition = false;
|
||
|
|
||
|
fulfil();
|
||
|
await new Promise(f => setTimeout(f, 0));
|
||
|
|
||
|
assert.htmlEqual(target.innerHTML, ``);
|
||
|
}
|
||
|
};
|