From f945fc82f28634eccac25a473895e96fd815de84 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Mon, 22 Jan 2024 14:27:00 +0100 Subject: [PATCH] update tests to reflect Lightning CSS bump + solves an issue we had where `height: 100vh; height: -moz-available;` was missing. Nice! --- tests/collapse-duplicate-declarations.test.js | 5 ++--- tests/detect-nesting.test.js | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tests/collapse-duplicate-declarations.test.js b/tests/collapse-duplicate-declarations.test.js index 7c5506895..e6f740315 100644 --- a/tests/collapse-duplicate-declarations.test.js +++ b/tests/collapse-duplicate-declarations.test.js @@ -161,12 +161,11 @@ it('should work on a real world example', () => { } ` - // TODO: This seems like a bug with compat data - // `-moz-available` should still be listed - // and most like `100vh` as well return run(input, config).then((result) => { expect(result.css).toMatchFormattedCss(css` .h-available { + height: 100vh; + height: -moz-available; height: -webkit-fill-available; } `) diff --git a/tests/detect-nesting.test.js b/tests/detect-nesting.test.js index 08eeacf98..73af8f15c 100644 --- a/tests/detect-nesting.test.js +++ b/tests/detect-nesting.test.js @@ -35,7 +35,7 @@ it('should not warn when we detect nested css inside css @layer rules', () => { } let input = css` - @layer tw-base, tw-components, tw-utilities; + @layer tw-base, tw-components; @layer tw-utilities { @tailwind utilities; } @@ -43,7 +43,7 @@ it('should not warn when we detect nested css inside css @layer rules', () => { return run(input, config).then((result) => { expect(result.css).toMatchFormattedCss(css` - @layer tw-base, tw-components, tw-utilities; + @layer tw-base, tw-components; @layer tw-utilities { .underline { text-decoration-line: underline;