diff --git a/test/known_issues/known_issues.status b/test/known_issues/known_issues.status index 7a50c10404c723..e19a87e7c39b6c 100644 --- a/test/known_issues/known_issues.status +++ b/test/known_issues/known_issues.status @@ -11,6 +11,9 @@ prefix known_issues # foreseeable future. The test itself is flaky and skipped. It # serves as a demonstration of the issue only. test-vm-timeout-escape-queuemicrotask: SKIP +# Skipping it because it crashes out of OOM instead of exiting. +# https://github.com/nodejs/node/issues/47353 +test-shadow-realm-gc: SKIP [$system==win32] diff --git a/test/known_issues/test-shadow-realm-gc.js b/test/known_issues/test-shadow-realm-gc.js new file mode 100644 index 00000000000000..cf15324e5cec06 --- /dev/null +++ b/test/known_issues/test-shadow-realm-gc.js @@ -0,0 +1,13 @@ +// Flags: --experimental-shadow-realm --max-old-space-size=20 +'use strict'; + +/** + * Verifying ShadowRealm instances can be correctly garbage collected. + */ + +require('../common'); + +for (let i = 0; i < 1000; i++) { + const realm = new ShadowRealm(); + realm.evaluate('new TextEncoder(); 1;'); +}