var func = function * (){ yield obj .method() .method2(); const actual = true; };