test: deflake test-vm-contextified-script-leak

Similar to the test-vm-source-text-module-leak fix, use a snapshot
to force a thorough GC in order to prevent false positives.

PR-URL: https://github.com/nodejs/node/pull/49710
Refs: https://github.com/nodejs/reliability/issues/669
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Joyee Cheung 2023-09-23 05:46:22 +02:00 committed by GitHub
parent e329a11515
commit 017998971b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,4 +13,4 @@ async function createContextifyScript() {
async importModuleDynamically() {}, async importModuleDynamically() {},
}); });
} }
checkIfCollectable(createContextifyScript, 2048); checkIfCollectable(createContextifyScript, 2048, 512);