From 193b30c56b5ff4cbd5a161780c7d5d2bd0cab5ec Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Mon, 9 Oct 2023 17:39:33 +0200 Subject: [PATCH] use `toMatchSnapshot` instead of `toMatchFormattedCss` More info: https://github.com/tailwindlabs/tailwindcss/pull/12170 --- .../__snapshots__/forcedColorsVariants.test.js.snap | 11 +++++++++++ tests/plugins/variants/forcedColorsVariants.test.js | 10 ++-------- 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 tests/plugins/variants/__snapshots__/forcedColorsVariants.test.js.snap diff --git a/tests/plugins/variants/__snapshots__/forcedColorsVariants.test.js.snap b/tests/plugins/variants/__snapshots__/forcedColorsVariants.test.js.snap new file mode 100644 index 000000000000..21e2dbb68333 --- /dev/null +++ b/tests/plugins/variants/__snapshots__/forcedColorsVariants.test.js.snap @@ -0,0 +1,11 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`should test the 'forcedColorsVariants' plugin 1`] = ` +" +@media (forced-colors: active) { + .forced-colors\\:flex { + display: flex; + } +} +" +`; diff --git a/tests/plugins/variants/forcedColorsVariants.test.js b/tests/plugins/variants/forcedColorsVariants.test.js index bbf6c42ada42..61a1f08cf5b9 100644 --- a/tests/plugins/variants/forcedColorsVariants.test.js +++ b/tests/plugins/variants/forcedColorsVariants.test.js @@ -1,9 +1,3 @@ -import { css, quickVariantPluginTest } from '../../util/run' +import { quickVariantPluginTest } from '../../util/run' -quickVariantPluginTest('forcedColorsVariants').toMatchFormattedCss(css` - @media (forced-colors: active) { - .forced-colors\:flex { - display: flex; - } - } -`) +quickVariantPluginTest('forcedColorsVariants').toMatchSnapshot()