|
|
@ -1,11 +1,11 @@
|
|
|
|
let subscribeCalled = false;
|
|
|
|
let unsubscribeCalled = false;
|
|
|
|
|
|
|
|
|
|
|
|
const fakeStore = val => ({
|
|
|
|
const fakeStore = val => ({
|
|
|
|
subscribe: cb => {
|
|
|
|
subscribe: cb => {
|
|
|
|
cb(val);
|
|
|
|
cb(val);
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
unsubscribe: () => {
|
|
|
|
unsubscribe: () => {
|
|
|
|
subscribeCalled = true;
|
|
|
|
unsubscribeCalled = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -22,6 +22,8 @@ export default {
|
|
|
|
async test({ assert, component, target }) {
|
|
|
|
async test({ assert, component, target }) {
|
|
|
|
component.foo = fakeStore(5);
|
|
|
|
component.foo = fakeStore(5);
|
|
|
|
|
|
|
|
|
|
|
|
return assert.htmlEqual(target.innerHTML, '<h1>5</h1>');
|
|
|
|
assert.htmlEqual(target.innerHTML, '<h1>5</h1>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assert.ok(unsubscribeCalled);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|