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

DRY tests #119

Merged
merged 3 commits into from
Nov 8, 2023
Merged

DRY tests #119

merged 3 commits into from
Nov 8, 2023

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Nov 8, 2023

Reduces some code duplication, and notably now generates a -changed.js so we can see test failures for imports.

@mbostock mbostock requested a review from cinxmo November 8, 2023 03:52
@mbostock
Copy link
Member Author

mbostock commented Nov 8, 2023

The latest commit also fixes the regeneration of test/output following a fresh run; the package.json only created test/output, and so the tests would fail when test/output/imports did not exist.

Regenerating test/output from scratch also identified that the test of a static npm protocol import added in #101 was inadvertently disabled in #40 (because the test file doesn’t end with -import.js and therefore is ignored). I fixed this by renaming the test to static-npm-import.js.

@mbostock mbostock force-pushed the mbostock/dry-javascript-tests branch from 22b1911 to 363e257 Compare November 8, 2023 04:59
Copy link
Contributor

@cinxmo cinxmo left a comment

Choose a reason for hiding this comment

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

thanks! It's much cleaner than what I had before

@mbostock mbostock merged commit ff6b407 into main Nov 8, 2023
1 check passed
@mbostock mbostock deleted the mbostock/dry-javascript-tests branch November 8, 2023 16:31
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.

None yet

2 participants