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-then-if/_config.js

29 lines
324 B

let fulfil;
const thePromise = new Promise((f) => {
fulfil = f;
});
export default {
get props() {
return { thePromise };
},
html: `
loading...
`,
async test({ assert, target }) {
fulfil([]);
await thePromise;
assert.htmlEqual(
target.innerHTML,
`
<p>promise array is empty</p>
`
);
}
};