From 60b9aaa3a95f48dc7a10e5bfbec4071fe04048cd Mon Sep 17 00:00:00 2001 From: Tony Gorez Date: Sat, 8 Nov 2025 23:03:18 +0100 Subject: [PATCH] test: async iife in repl PR-URL: https://github.com/nodejs/node/pull/44878 Fixes: https://github.com/nodejs/node/issues/38685 Reviewed-By: Luigi Pinca Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Antoine du Hamel --- test/parallel/test-repl-async-iife.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/parallel/test-repl-async-iife.js diff --git a/test/parallel/test-repl-async-iife.js b/test/parallel/test-repl-async-iife.js new file mode 100644 index 0000000000..e1f5ca7812 --- /dev/null +++ b/test/parallel/test-repl-async-iife.js @@ -0,0 +1,10 @@ +'use strict'; +require('../common'); + +// Note: This test ensures that async IIFE doesn't crash +// Ref: https://github.com/nodejs/node/issues/38685 + +const repl = require('repl').start({ terminal: true }); + +repl.write('(async() => { })()\n'); +repl.write('.exit\n');