Elaborate on observable testing

This commit is contained in:
Tom Crockett
2018-01-23 13:00:24 -08:00
parent 75db920668
commit d0adcf2e8f
+8 -3
View File
@@ -10,9 +10,14 @@ const jss = createJSS().setup({});
const styleSheet = jss.createStyleSheet<string>(
{
ruleWithMockObservable: {
subscribe: () => ({
unsubscribe() {}
})
subscribe: observer => {
const next = typeof observer === 'function' ? observer : observer.next;
next({ background: 'blue', display: 'flex' });
next({ invalidKey: 'blueish' }); // $ExpectError
return {
unsubscribe() {}
};
}
},
container: {
display: 'flex',