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-set-simultaneous/_config.js

19 lines
360 B

export default {
test({ assert, component, target }) {
const promise = Promise.resolve().then(() => {
component.answer = 42;
});
component.promise = promise;
assert.htmlEqual(target.innerHTML, '<p>wait for it...</p>');
return promise
.then(() => {
assert.htmlEqual(target.innerHTML, `
<p>the answer is 42!</p>
`);
});
}
};