From 7002e1ef90998eab357e46d6426d9fa84e8e4967 Mon Sep 17 00:00:00 2001 From: Felix Scholze Date: Sun, 7 Aug 2022 14:19:55 +0200 Subject: [PATCH] ci(target-anchor-offset): add test --- tests/target-anchor-offset.spec.scss | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 tests/target-anchor-offset.spec.scss diff --git a/tests/target-anchor-offset.spec.scss b/tests/target-anchor-offset.spec.scss new file mode 100644 index 0000000..4f83670 --- /dev/null +++ b/tests/target-anchor-offset.spec.scss @@ -0,0 +1,22 @@ +@use 'true'; +@use '../mixins' as mx; + +@include true.describe('target-anchor-offset()') { + @include true.it('should return a offset for target anchor') { + @include true.assert { + @include true.output { + @include mx.target-anchor-offset(150px); + } + @include true.expect { + :target { + &::before { + content: ''; + display: block; + height: 150px; + margin-top: -150px; + } + } + } + } + } +}