Skip to content

Allow actual fixtures other than .js#5511

Closed
sheerun wants to merge 1 commit intobabel:masterfrom
sheerun:raw-fixtures
Closed

Allow actual fixtures other than .js#5511
sheerun wants to merge 1 commit intobabel:masterfrom
sheerun:raw-fixtures

Conversation

@sheerun
Copy link
Copy Markdown

@sheerun sheerun commented Mar 20, 2017

Q A
Patch: Bug Fix? no
Major: Breaking Change? no
Minor: New Feature? no
Deprecations? no
Spec Compliancy? yes
Tests Added/Pass? yes
Fixed Tickets
License MIT
Doc PR
Dependency Changes

This change allows for easier testing of babel plugins that operate on files of extensions other than .js. In particular it allows for loading fixtures where actual file has extension different than .js, for example: actual.json, actual.css, actual.gql, etc.

I've also added missing tests. There should be 100% backward compatibility

@mention-bot
Copy link
Copy Markdown

@sheerun, thanks for your PR! By analyzing the history of the files in this pull request, we identified @hzoo, @zertosh and @existentialism to be potential reviewers.

@babel-bot
Copy link
Copy Markdown
Collaborator

Hey @sheerun! It looks like one or more of your builds have failed. I've copied the relevant info below to save you some time.

@sheerun
Copy link
Copy Markdown
Author

sheerun commented Mar 20, 2017

The test cases produced by this module for raw files (with extensions other than .js), don't seem to be passed to either visitor or manipulateOptions... not sure why. There's no point polishing this PR if I don't solve it. Any help appreciated.

@hzoo
Copy link
Copy Markdown
Member

hzoo commented Mar 20, 2017

https://github.com/babel/babel/blob/7.0/packages/babel-helper-fixtures/README.md#babel-helper-fixtures

Thanks for the PR! babel-helper-fixtures/fixture-test-runner is intended for internal babel plugin use - not that we won't add it but I'm hesitant to add anything for what we aren't going to use ourselves.

@danez danez closed this Aug 31, 2017
@danez danez reopened this Aug 31, 2017
@danez danez changed the base branch from 7.0 to master August 31, 2017 18:23
Copy link
Copy Markdown
Member

@xtuc xtuc left a comment

Choose a reason for hiding this comment

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

This can be implemented by plugin author. We don't need the support for that in Babel itself.

@loganfsmyth
Copy link
Copy Markdown
Member

I'm triaging old PR on Babel. Since this has been sitting for ages, I'm going to close it. If it's a conversation you want to continue, happy to do that though.

@loganfsmyth loganfsmyth closed this Sep 8, 2018
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants