| function shouldBe(expected, actual, msg) { |
| throw new Error("bad value" + msg + ": " + actual + ". Expected " + expected); |
| function shouldBeAsync(expected, run, msg) { |
| run().then(function(value) { actual = value; }, |
| function(error) { hadError = true; actual = error; }); |
| shouldBe(expected, actual, msg); |
| class ChildClass extends BaseClass { |
| return async x => super.baseClassValue(); |
| return async x => { return super.baseClassValue(); } |
| shouldBeAsync("BaseClassValue", new ChildClass().asyncSuperProp()); |
| shouldBeAsync("BaseClassValue", new ChildClass().asyncSuperProp2()); |
| class ChildClass2 extends BaseClass { |
| return async (self = super()) => self.baseClassValue() + ' ' + super.property; |
| shouldBeAsync("BaseClassValue test!", new ChildClass2()); |