@@ -187,6 +187,17 @@ test('putout: operator: jsx: removeAttributeValue', (t) => {
187187 t . end ( ) ;
188188} ) ;
189189
190+ test ( 'putout: operator: jsx: removeAttributeValue: no' , ( t ) => {
191+ const node = template . ast . fresh ( '<hello className="hello world"/>' ) ;
192+ removeAttributeValue ( node , 'className' , 'abc' ) ;
193+
194+ const result = print ( node ) ;
195+ const expected = `<hello className="hello world"/>;\n` ;
196+
197+ t . equal ( result , expected ) ;
198+ t . end ( ) ;
199+ } ) ;
200+
190201test ( 'putout: operator: jsx: setAttributeValue' , ( t ) => {
191202 const node = template . ast . fresh ( '<hello className="hello"/>' ) ;
192203 setAttributeValue ( node , 'className' , 'world' ) ;
@@ -250,6 +261,17 @@ test('putout: operator: jsx: removeClassName: first', (t) => {
250261 t . end ( ) ;
251262} ) ;
252263
264+ test ( 'putout: operator: jsx: removeClassName: middle' , ( t ) => {
265+ const node = template . ast . fresh ( '<hello className="hello world abc"/>' ) ;
266+ removeClassName ( node , 'world' ) ;
267+
268+ const result = print ( node ) ;
269+ const expected = `<hello className="hello abc"/>;\n` ;
270+
271+ t . equal ( result , expected ) ;
272+ t . end ( ) ;
273+ } ) ;
274+
253275test ( 'putout: operator: jsx: containsClassName' , ( t ) => {
254276 const node = template . ast . fresh ( '<hello className="hello world"/>' ) ;
255277 const result = containsClassName ( node , 'world' ) ;
0 commit comments