Skip to content

Commit 50b6587

Browse files
committed
Simplify tests
1 parent 17fed25 commit 50b6587

File tree

1 file changed

+5
-22
lines changed

1 file changed

+5
-22
lines changed

tests/plugins.test.ts

Lines changed: 5 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -166,32 +166,15 @@ let tests: PluginTest[] = [
166166
`<div class="{{ 'flex ' + ' underline' + ' block' }}"></div>`,
167167
],
168168

169-
// Drupal attributes.addClass() tests
170-
[
171-
`<div {{ attributes.addClass("sm:p-0 p-0") }}></div>`,
172-
`<div {{ attributes.addClass('p-0 sm:p-0') }}></div>`,
173-
],
174-
[
175-
`{{ attributes.addClass("sm:p-0 p-0") }}`,
176-
`{{ attributes.addClass('p-0 sm:p-0') }}`,
177-
],
178-
[
179-
`{% set className = "p-0 sm:p-0" %}
180-
{{ attributes.addClass(className) }}`,
181-
`{% set className = 'p-0 sm:p-0' %}
182-
{{ attributes.addClass(className) }}`,
183-
],
169+
// Function call tests
170+
t`<div {{ attributes.addClass('${yes}') }}></div>`,
171+
t`{{ attributes.addClass('${yes}') }}`,
172+
t`{{ attributes.addClass('${yes}').addClass('${yes}').addClass('${yes}') }}`,
173+
t`{% set className = '${no}' %} {{ attributes.addClass(className) }}`,
184174
[
185175
`{{ attributes.addClass("sm:p-0 " ~ variant ~ " p-0") }}`,
186176
`{{ attributes.addClass('sm:p-0 ' ~ variant ~ ' p-0') }}`,
187177
],
188-
[
189-
`{{ attributes
190-
.addClass("sm:p-0 p-0")
191-
.addClass("flex block")
192-
.addClass("underline") }}`,
193-
`{{ attributes.addClass('p-0 sm:p-0').addClass('block flex').addClass('underline') }}`,
194-
],
195178
],
196179
},
197180
},

0 commit comments

Comments
 (0)