export default {
props: {
thePromise: new Promise((_) => {}),
count: 0,
},
html: `
`,
async test({ assert, component, target }) {
await (component.thePromise = Promise.resolve(component.Component));
assert.htmlEqual(
target.innerHTML,
`
`
);
component.count = 5;
assert.htmlEqual(
target.innerHTML,
`
`
);
try {
await (component.thePromise = Promise.reject(component.Component));
} catch (error) {
// ignore
}
assert.htmlEqual(
target.innerHTML,
`
`
);
component.count = 10;
assert.htmlEqual(
target.innerHTML,
`
`
);
},
};