Skip to content

Commit

Permalink
Add basic wrapping test
Browse files Browse the repository at this point in the history
  • Loading branch information
zaguiini committed Sep 26, 2023
1 parent 926adbb commit 57a23a5
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/block-editor/src/utils/test/transform-styles.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Internal dependencies
*/
import transformStyles from '../transform-styles';

it( 'should wrap selectors inside container queries', () => {
const input = `
@container (width > 400px) {
h1 { color: red; }
}`;
const output = transformStyles( { input: { css: input } }, 'my-namespace' );

expect( output ).toEqual( [
`
@container (width > 400px) {
.my-namespace h1 { color: red; }
}`,
] );
} );

0 comments on commit 57a23a5

Please sign in to comment.