Skip to content

Feature request: Add JUnit 5 extension that invokes start/validateSnapshots #19

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

Open
grimsa opened this issue Mar 31, 2019 · 0 comments

Comments

@grimsa
Copy link
Collaborator

grimsa commented Mar 31, 2019

Currently the following block has to be duplicated in every test.

    @BeforeAll
    static void beforeAll() {
        SnapshotMatcher.start();
    }

    @AfterAll
    static void afterAll() {
        SnapshotMatcher.validateSnapshots();
    }

It should be possible to add a simple JUnit 5 extension that would handle this.

Note for implementation:
JUnit 5 compile dependency should be optional - i.e. projects using JUnit 4 or an entirely different testing framework should not get transitive JUnit 5 jars.

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

No branches or pull requests

1 participant