enable JsImportTaskTypes (#88728)
authorPavel Savara <pavel.savara@gmail.com>
Wed, 12 Jul 2023 18:31:41 +0000 (20:31 +0200)
committerGitHub <noreply@github.com>
Wed, 12 Jul 2023 18:31:41 +0000 (20:31 +0200)
src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JSImportExportTest.cs
src/libraries/System.Runtime.InteropServices.JavaScript/tests/System.Runtime.InteropServices.JavaScript.UnitTests/System/Runtime/InteropServices/JavaScript/JavaScriptTestHelper.mjs

index 5f16d50..96b5835 100644 (file)
@@ -1505,16 +1505,20 @@ namespace System.Runtime.InteropServices.JavaScript.Tests
         }
 
         [Fact]
-        [ActiveIssue("https://github.com/dotnet/runtime/issues/77334")]
         public async Task JsImportTaskTypes()
         {
-            object a = new object();
-            Exception e = new Exception();
-            JSObject j = JSHost.GlobalThis;
-            Assert.Equal("test", await JavaScriptTestHelper.echopromise_String("test"));
-            Assert.Same(a, await JavaScriptTestHelper.echopromise_Object(a));
-            Assert.Same(e, await JavaScriptTestHelper.echopromise_Exception(e));
-            Assert.Same(j, await JavaScriptTestHelper.echopromise_JSObject(j));
+            for(int i=0;i<100;i++)
+            {
+                object a = new object();
+                Exception e = new Exception();
+                JSObject j = JSHost.GlobalThis;
+                Assert.Equal("test", await JavaScriptTestHelper.echopromise_String("test"));
+                Assert.Same(a, await JavaScriptTestHelper.echopromise_Object(a));
+                Assert.Same(e, await JavaScriptTestHelper.echopromise_Exception(e));
+                Assert.Same(j, await JavaScriptTestHelper.echopromise_JSObject(j));
+                GC.Collect();
+                await Task.Delay(10);
+            }
         }
 
         [Fact]