Skip to content

feat: handle old and new Babel configs#1789

Open
ojeytonwilliams wants to merge 3 commits intofreeCodeCamp:mainfrom
ojeytonwilliams:feat/handle-babel-targets
Open

feat: handle old and new Babel configs#1789
ojeytonwilliams wants to merge 3 commits intofreeCodeCamp:mainfrom
ojeytonwilliams:feat/handle-babel-targets

Conversation

@ojeytonwilliams
Copy link
Copy Markdown
Contributor

Checklist:

freeCodeCamp/freeCodeCamp#53127 changes a bunch of challenges to be compatible with the new Babel config, but unfortunately they're not compatible with the old config. This works around that by testing against both configs and passing the challenge if at least one test passes.

I tried to test this locally, but I can't seem to get the emulator working. Sorry about that.

@ojeytonwilliams ojeytonwilliams requested a review from a team as a code owner April 30, 2026 08:42
challenge!,
_babelWebView.webViewController,
);
userCode = userCodeVariants.transpileScriptWithTargets;
Copy link
Copy Markdown
Member

@Nirajn2311 Nirajn2311 May 8, 2026

Choose a reason for hiding this comment

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

This only tests the challenges against one variant ie. the variant with targets, in the editor

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks Niraj, I've updated it to use both.

I didn't entirely understand what was going on in the test code, so I refactored it a bit until I could make sense of it. I hope that's okay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants