From 7b565c5817d0b75a4e089b2e12e302291e0725ef Mon Sep 17 00:00:00 2001 From: Sergio Vera Date: Wed, 1 Sep 2021 12:39:35 +0200 Subject: [PATCH] AC-954: Create unit test for Magento2\Less\TypeSelectorsSniff check --- .../Tests/Less/TypeSelectorsUnitTest.less | 23 ++++++++++++++++ Magento2/Tests/Less/TypeSelectorsUnitTest.php | 27 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 Magento2/Tests/Less/TypeSelectorsUnitTest.less create mode 100644 Magento2/Tests/Less/TypeSelectorsUnitTest.php diff --git a/Magento2/Tests/Less/TypeSelectorsUnitTest.less b/Magento2/Tests/Less/TypeSelectorsUnitTest.less new file mode 100644 index 00000000..1894d7b6 --- /dev/null +++ b/Magento2/Tests/Less/TypeSelectorsUnitTest.less @@ -0,0 +1,23 @@ +// /** +// * Copyright © Magento, Inc. All rights reserved. +// * See COPYING.txt for license details. +// */ + +.error { + some: 'stuff'; +} + +/** + * Should throw an error, Will be implemented in MAGETWO-49778 + */ +div.error { + anything: 'else'; +} + +.nav > LI { + #bar .baz(); +} + +.nav > ul { + foo: 'bar'; +} diff --git a/Magento2/Tests/Less/TypeSelectorsUnitTest.php b/Magento2/Tests/Less/TypeSelectorsUnitTest.php new file mode 100644 index 00000000..1c6ab265 --- /dev/null +++ b/Magento2/Tests/Less/TypeSelectorsUnitTest.php @@ -0,0 +1,27 @@ + 1, + ]; + } + + /** + * @inheritdoc + */ + public function getWarningList() + { + return []; + } +}