Skip to content

D3FC unit test#494

Merged
texodus merged 3 commits intomasterfrom
d3fc-unit-test
Mar 26, 2019
Merged

D3FC unit test#494
texodus merged 3 commits intomasterfrom
d3fc-unit-test

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.

@mhooper-scottlogic
Copy link
Contributor

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

@mhooper-scottlogic
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

Development

Successfully merging this pull request may close these issues.

3 participants