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

9395 Set up basic Jest/Enzyme tests for React #577

Closed

Conversation

cooperka
Copy link
Member

@cooperka cooperka commented Feb 14, 2019

Closed in favor of #581


Fairly simple change overall, but you can read commit-by-commit if you want to see the process.

  • Jest framework
  • Enzyme toolkit
  • Basic working snapshot test with component interaction
  • Integrate with CI (@smoyth wanted to handle this)

.babelrc Show resolved Hide resolved
Copy link
Contributor

@smoyte smoyte left a comment

Choose a reason for hiding this comment

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

Super cool! Just one question about the babelrc thing. Thanks for teaching me about this stuff!

.babelrc Show resolved Hide resolved
.eslintrc.yml Show resolved Hide resolved
@cooperka
Copy link
Member Author

@smoyth I think tests are failing now because some test suite isn't setting a NODE_ENV (or it's something other than test or production). Tests worked both before and after removing modules: false from the config, so it must be because of the env change.

Can you point me to the command that runs the test that gave this output on CI:

------------ BROWSER LOGS -------------
SEVERE 2019-02-15 17:48:45 +0000: http://127.0.0.1:44746/packs-test/application-d44347d2ad8823ff9d55.js 23362:16 Error: Module build failed: SyntaxError: Unexpected token (20:6)
  18 |     const displayIfOptions = ["always", "all_met", "any_met"];
  19 |     return displayIfOptions.map((option) => (
> 20 |       <option
     |       ^

@cooperka cooperka force-pushed the 9395-basic-jest-setup branch from d0fd577 to ca2604b Compare February 21, 2019 02:54
@smoyte smoyte closed this Feb 21, 2019
@cooperka cooperka deleted the 9395-basic-jest-setup branch February 21, 2019 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants