Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: async iife in repl #44878

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions test/parallel/test-repl-async-iife.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';
require('../common');

// Note: This test ensures that async IIFE doesn't crash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know the Node.js version for which this test would crash? It only affects debug builds, so it would probably require building Node.js locally for confirming that this is actually a regression test for the issue.

Seeing #38685 (comment) it appears that it got fixed later on, so I'm curious what the fix was.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @RaisinTen 👋

Honestly I don't have a clue on this :/

Maybe @addaleax could provide the version.

Copy link
Member

@targos targos Nov 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it affected the master branch in May 2021, so I would try with v14.0.0.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @targos :)

Should I checkout the v14 branch and run the test it and see if it fails?

// Ref: https://github.com/nodejs/node/issues/38685

const repl = require('repl').start({ terminal: true });

repl.write('(async() => { })()\n');
repl.write('.exit\n');