public static EcmaValue Throw([This] EcmaValue thisValue, EcmaValue value) { try { AsyncGenerator generator = thisValue.GetUnderlyingObject <AsyncGenerator>(); return(generator.Throw(value)); } catch (Exception ex) { return(Promise.Reject(ex)); } }
public void GenerateCodeAsString_SynchronousServiceInterface_GeneratesAsyncInterface() { // Arrange var asyncGenerator = new AsyncGenerator(); // Act var outputFileContents = asyncGenerator.GenerateCodeAsString(InputFileContents); // Assert Assert.AreEqual(ExpectedOutputFileContents, outputFileContents); }