From 602e6b5fabd3f86a23c31d1e0c17f8bf5fdda9ee Mon Sep 17 00:00:00 2001 From: Tony Gorez Date: Mon, 3 Oct 2022 08:33:50 +0100 Subject: [PATCH 1/2] test: async iife in repl --- test/parallel/test-repl-async-iife.js | 11 +++++++++++ 1 file changed, 11 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 00000000000000..3b3a2b0120ba2b --- /dev/null +++ b/test/parallel/test-repl-async-iife.js @@ -0,0 +1,11 @@ +'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'); + From 4f214eae6cda5ab0e454b308611143e6f04561c1 Mon Sep 17 00:00:00 2001 From: Tony Gorez Date: Mon, 3 Oct 2022 17:33:12 +0200 Subject: [PATCH 2/2] fix: lint test file --- test/parallel/test-repl-async-iife.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/parallel/test-repl-async-iife.js b/test/parallel/test-repl-async-iife.js index 3b3a2b0120ba2b..e1f5ca78128ad4 100644 --- a/test/parallel/test-repl-async-iife.js +++ b/test/parallel/test-repl-async-iife.js @@ -1,4 +1,4 @@ -'use strict' +'use strict'; require('../common'); // Note: This test ensures that async IIFE doesn't crash @@ -8,4 +8,3 @@ const repl = require('repl').start({ terminal: true }); repl.write('(async() => { })()\n'); repl.write('.exit\n'); -