From 9127b1c1c544ea54196353678b6b18da3bb065be Mon Sep 17 00:00:00 2001 From: krister Date: Wed, 5 Dec 2018 22:04:53 +0200 Subject: [PATCH] Add more tests --- .../__tests__/index.js | 39 ++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/rules/at-function-named-arguments/__tests__/index.js b/src/rules/at-function-named-arguments/__tests__/index.js index 27aeb846..aba0e004 100644 --- a/src/rules/at-function-named-arguments/__tests__/index.js +++ b/src/rules/at-function-named-arguments/__tests__/index.js @@ -163,6 +163,18 @@ testRule(rule, { ) !default; `, description: "Always. Should ignore Sass maps with default." + }, + { + code: ` + $color: #123456; + + $rgb: ( + "r": red($red: $color), + "g": green($green: $color), + "b": blue($blue: $color) + ); + `, + description: "Always. function call inside a map." } ], @@ -261,6 +273,18 @@ testRule(rule, { column: 9, description: "Always. Example: native CSS function inside a function call." + }, + { + code: ` + $color: #123456; + + $rgb: ( + "r": red($color), + "g": green($color), + "b": blue($color) + ); + `, + description: "Always. function call inside a map." } ] }); @@ -519,8 +543,19 @@ testRule(rule, { line: 3, column: 9, message: messages.rejected, - description: - "Always. Example: native CSS function inside a function call." + description: "Never. Example: native CSS function inside a function call." + }, + { + code: ` + $color: #123456; + + $rgb: ( + "r": red($red: $color), + "g": green($green: $color), + "b": blue($green: $color) + ); + `, + description: "Never. function call inside a map." } ] });