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

Mock validation utility #5653

Merged
merged 7 commits into from
May 12, 2021
Merged

Mock validation utility #5653

merged 7 commits into from
May 12, 2021

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented May 11, 2021

Followup of #4762.
Addressing #4733.
Thanks to #5411, now we could node.js for our mock validation 🎉
It is now feasible to run validation tests both locally namely when contributors add new mocks/features to the library, as well as on CircleCI.
While new script does not depend on browserify and jasmine to resolve and load multiple files all at once, it is more robust now and could remove potential side effects of the previous mock_test on parallel runs.

Plus after adding a new mock, it would automatically be tested by this system when there is no need to add its name to the list.

Since we used to run this in noci_test right before publishing (and sometimes fail at final moments), the current setup should help reduce all the noise too.

@plotly/plotly_js

@archmoj archmoj added this to the NEXT milestone May 11, 2021
@archmoj archmoj requested a review from alexcjohnson May 11, 2021 20:46
@alexcjohnson
Copy link
Collaborator

LGTM! Have you seen this fail on CI? ie just push a branch off this one with a purposely invalid addition to a mock, just to make sure it will properly flag failures for us.

@archmoj
Copy link
Contributor Author

archmoj commented May 12, 2021

LGTM! Have you seen this fail on CI? ie just push a branch off this one with a purposely invalid addition to a mock, just to make sure it will properly flag failures for us.

Good call. Tested locally and on the CI.
I also added the option to simply test only the mock(s) needed in 2e8ce24.

@archmoj
Copy link
Contributor Author

archmoj commented May 12, 2021

Here the CI failing example:
https://app.circleci.com/pipelines/github/plotly/plotly.js/3826/workflows/b8864a65-0b2a-4382-8f02-0743146be98e/jobs/112705/parallel-runs/0/steps/0-103

@archmoj archmoj changed the title Improve mock validation test Mock validation utility May 12, 2021
Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

Love it. Especially that we can switch from a whitelist to a blacklist (and hopefully over time cut that list down). 💃

@archmoj archmoj merged commit 84bf2bc into master May 12, 2021
@archmoj archmoj deleted the improve-mock-validation branch May 12, 2021 14:56
@archmoj archmoj mentioned this pull request May 12, 2021
17 tasks
@archmoj archmoj mentioned this pull request May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants