testify
testify copied to clipboard
suite: fix panic if a WithStats suite skips a test early
Summary
Continues work from https://github.com/stretchr/testify/pull/1723 by @FGasper . This PR rebases with the latest master.
This fixes issue https://github.com/stretchr/testify/issues/1722.
Changes
Prevent stats.end() if stats.start() never ran.
Motivation
Allow skipping a test in a setup/before hook. See issue https://github.com/stretchr/testify/issues/1722 for an example.
Related issues
Closes https://github.com/stretchr/testify/issues/1722