File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,32 @@ describe('counter', () => {
8080 } )
8181} )
8282
83+ describe ( 'class attr' , ( ) => {
84+ test ( 'user-provided class is applied alongside fa-layers-text' , ( ) => {
85+ const wrapper = compileAndMount ( {
86+ template : '<font-awesome-layers-text value="New!" class="gray8" />' ,
87+ components : {
88+ FontAwesomeLayersText
89+ }
90+ } )
91+
92+ expect ( wrapper . element . classList . contains ( 'fa-layers-text' ) ) . toBe ( true )
93+ expect ( wrapper . element . classList . contains ( 'gray8' ) ) . toBe ( true )
94+ } )
95+
96+ test ( 'user-provided class does not replace fa-layers-counter' , ( ) => {
97+ const wrapper = compileAndMount ( {
98+ template : '<font-awesome-layers-text :value="42" :counter="true" class="my-counter" />' ,
99+ components : {
100+ FontAwesomeLayersText
101+ }
102+ } )
103+
104+ expect ( wrapper . element . classList . contains ( 'fa-layers-counter' ) ) . toBe ( true )
105+ expect ( wrapper . element . classList . contains ( 'my-counter' ) ) . toBe ( true )
106+ } )
107+ } )
108+
83109describe ( 'reactivity' , ( ) => {
84110 test ( 'changing props should update the element' , async ( ) => {
85111 const wrapper = compileAndMount ( {
You can’t perform that action at this time.
0 commit comments