Skip to content

Conversation

timvancleef
Copy link
Contributor

Adds a missing jest transform config setting when using es6 modules.

Adds a missing jest transform config setting when using es6 modules.
@timvancleef timvancleef changed the title Adds setup information for testing-library-svelte docs(svelte): Adds setup information for testing-library-svelte Sep 5, 2020
Copy link
Member

@m98 m98 left a comment

Choose a reason for hiding this comment

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

I don't have any comment on if this change is necessary or not. But I only found two minor issues which I liked to mention.

@timvancleef timvancleef requested a review from m98 September 7, 2020 12:42
Copy link
Member

@m98 m98 left a comment

Choose a reason for hiding this comment

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

I have not any other feedback.

@mihar-22 and @benmonro do you have any feedback?

@mihar-22
Copy link
Contributor

mihar-22 commented Sep 7, 2020

Mmm I'm not really sure because there is a section right now for people who need Babel: https://testing-library.com/docs/svelte-testing-library/setup#babel--preprocessor. I guess the question is whether we should add it by default... and I think we should since I can't imagine anyone testing Svelte with Jest is not using ES modules. A few recommendations:

  • Add an install instruction to step 5: npm install babel-jest -D
  • Add a default .babelrc setup to step 5:
{ "presets": [["@babel/preset-env", { "targets": { "node": "current" } }]] }
  • Remove Babel from the bottom of the setup docs and just leave all the information about preprocessors.
@timvancleef timvancleef requested a review from m98 September 9, 2020 16:20
@timvancleef
Copy link
Contributor Author

Hi @mihar-22, @m98 do you have any further opinions on this PR?

@mihar-22
Copy link
Contributor

Sorry for the delayed response @timvancleef, I have nothing to add looks good to me.

@alexkrolick alexkrolick merged commit ec7eeb3 into testing-library:master Oct 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants