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

D3FC unit test #494

Merged
merged 3 commits into from
Mar 26, 2019
Merged

D3FC unit test #494

merged 3 commits into from
Mar 26, 2019

Conversation

texodus
Copy link
Member

@texodus texodus commented Mar 25, 2019

Added support for Jest unit tests w/babel to the perspective-viewer-d3fc plugin, with a stolen test implementation from the D3FC PoC repo

@texodus texodus changed the title D3fc unit test D3FC unit test Mar 25, 2019
@texodus
Copy link
Member Author

texodus commented Mar 25, 2019

@matt-hooper There were a few issues:

  • babel-jest did not add support for Babel 7's babel.config.js until version 24, which caused our settings to not get picked up.
  • The top-level jest config had transform: {}, and used roots instead of projects which caused the package local configs to not get picked up.
  • There is a bug in jest which causes it to always ready the babel.config.js from the <rootdir> rather than the local package when using the multi-project runner, which required a custom transformer workaround.

I've also moved the test suite into integration/ and unit/ sub-directories. Let me know if this is OK to merge.

@matt-hooper
Copy link
Contributor

Thanks for the PR. I will take a look and let you know how I get on.

@matt-hooper
Copy link
Contributor

@texodus, I have no issue with this being merged. It will be very useful. Thanks

@texodus
Copy link
Member Author

texodus commented Mar 26, 2019

Groovy, thanks!

@texodus texodus merged commit 9cbfd1f into master Mar 26, 2019
@texodus texodus deleted the d3fc-unit-test branch March 26, 2019 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants