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

use duck test for marks #967

Merged
merged 1 commit into from
Jul 3, 2022
Merged

use duck test for marks #967

merged 1 commit into from
Jul 3, 2022

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Jul 3, 2022

This allows different versions of Plot to be composed, e.g.: https://observablehq.com/d/2f8e482dc7cc105f

The duck test for Mark here is limited: it only tests for a render method, but it will crash downstream if the filter or initialize methods are not defined. We could test for those, too, or provide default implementations, but I figure this is fine for now.

@mbostock mbostock requested a review from Fil July 3, 2022 14:41
@mbostock mbostock merged commit 3371256 into main Jul 3, 2022
@mbostock mbostock deleted the mbostock/duck-mark branch July 3, 2022 16:47
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