Remove Test::More dependency in favor of Test2::API#3
Open
yuu-no wants to merge 3 commits intomohawk2:masterfrom
Open
Remove Test::More dependency in favor of Test2::API#3yuu-no wants to merge 3 commits intomohawk2:masterfrom
yuu-no wants to merge 3 commits intomohawk2:masterfrom
Conversation
Author
|
Hi @mohawk2, I’m just following up on this PR. I believe this change would be beneficial for the project. Could you please take a look when you have a moment? Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR removes the runtime dependency on Test::More, making Test::Snapshot compatible with Test2::V0 directly.
Changes
require Test::Morewith pure Test2::API usage$ctx->pass/fail/diaginstead ofTest::More::pass/fail/diag$Test::Builder::Levelmanipulation (no longer needed with context)test2_add_callback_pre_subtestand Hub metadata_get_filename()to use$0and Hub metadata instead of Test::Builder metadataMotivation
Users who prefer Test2::V0 over Test::More can now use Test::Snapshot without pulling in Test::More as a runtime dependency. This also simplifies the codebase by using the modern Test2::API directly.
Test plan
prove -lr t/)t/snapshot-test2.tfor Test2::V0 compatibility testingt/snapshot.t→t/snapshot-testmore.tto clarify test coverage