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 <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Tony Gorez
2025-11-08 23:03:18 +01:00
committed by GitHub
parent 38af5317b4
commit 60b9aaa3a9

View File

@@ -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');