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/await-in-removed-if/_config.js

22 lines
301 B

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, ``);
}
};