diff --git a/test/parallel/test-repl-async-iife.js b/test/parallel/test-repl-async-iife.js new file mode 100644 index 00000000000000..e1f5ca78128ad4 --- /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');