Skip to content

Conversation

@RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Jul 28, 2021

This PR will improve some of the tests:

  • Fixed the universal selector change
  • Ensured that tests that don't rely on the the universal selector are simplified (for example the relative paths one)
  • Added a css tagged template literal function in some files, this will allow prettier to format the contents of those. This should improve diffing in the future.
  • Improved the sanity tests. Every time we changed the version number, those tests started failing because the old version was still encoded in the test file.

This is the commit that we could "undo" in the future if we need it
again.
This test doesn't require the "reset" selector (whether it is super specific or universal)

Simplified it so that it tests the relative purge config and nothing else.
This allows prettier to format the string as CSS. This improves formatting and will improve future diffs.
Every time we bump the Tailwind version, the sanity tests fail, because
the current version is encoded in the fixture files.

This will ensure that all of the contents is still checked and the
header is skipped. The header will be tested against a regex to ensure
that it is still there.

This should be a small but nice QoL improvement, so that we don't have
to think about updating those tests whenever we fix bugs or land new
features.
@RobinMalfait RobinMalfait changed the title improve tests Improve tests Jul 28, 2021
@adamwathan adamwathan merged commit bfc9fa7 into master Jul 29, 2021
@adamwathan adamwathan deleted the improve-tests branch July 29, 2021 11:31
@adamwathan
Copy link
Member

Thanks!

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.

3 participants