Skip to content

test(transformer): handle more exec tests#8493

Merged
graphite-app[bot] merged 1 commit intomainfrom
01-14-test_transformer_handle_more_exec_tests
Jan 15, 2025
Merged

test(transformer): handle more exec tests#8493
graphite-app[bot] merged 1 commit intomainfrom
01-14-test_transformer_handle_more_exec_tests

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jan 14, 2025

Some of Babel's exec tests contain a return statement at top level, in order to return a Promise.

e.g. https://github.com/babel/babel/blob/ad572fd1a1615f53c4e3b85941760bdb1a1aefd9/packages/babel-plugin-transform-private-methods/test/fixtures/private-method-loose/async/exec.js

These test files could not be parsed due to illegal position of return, and the tests were silently excluded.

This PR:

  1. Includes those tests by passing allow_return_outside_function: true option to parser for exec tests.
  2. Includes a "transform error" message in snapshot for any exec tests which produce errors in parser/transformer.

@github-actions github-actions bot added the A-transformer Area - Transformer / Transpiler label Jan 14, 2025
Copy link
Member Author

overlookmotel commented Jan 14, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Jan 14, 2025
@overlookmotel overlookmotel marked this pull request as ready for review January 14, 2025 17:35
@overlookmotel overlookmotel requested a review from Dunqing January 14, 2025 17:51
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jan 15, 2025
@graphite-app
Copy link
Contributor

graphite-app bot commented Jan 15, 2025

Merge activity

Some of Babel's exec tests contain a return statement at top level, in order to return a Promise.

e.g. https://github.com/babel/babel/blob/ad572fd1a1615f53c4e3b85941760bdb1a1aefd9/packages/babel-plugin-transform-private-methods/test/fixtures/private-method-loose/async/exec.js

These test files could not be parsed due to illegal position of `return`, and the tests were silently excluded.

This PR:

1. Includes those tests by passing `allow_return_outside_function: true` option to parser for exec tests.
2. Includes a "transform error" message in snapshot for any exec tests which produce errors in parser/transformer.
@Dunqing Dunqing force-pushed the 01-14-test_transformer_handle_more_exec_tests branch from dcb74e0 to ca02c16 Compare January 15, 2025 02:07
@graphite-app graphite-app bot merged commit ca02c16 into main Jan 15, 2025
16 checks passed
@graphite-app graphite-app bot deleted the 01-14-test_transformer_handle_more_exec_tests branch January 15, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-transformer Area - Transformer / Transpiler C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants