Remove Test::More dependency in favor of Test2::API - #3
Conversation
|
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! |
|
Thank you for the contribution! I've just added GHA CI on this, and rebased your branch over it. You can see above that it's failed the release tests ( |
|
I've also removed the blank lines you added (my personal taste) and the |
|
Thank you again! I'll add a note in By the way, you PR-ed this from your |
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