diff --git a/__tests__/customConfig.test.js b/__tests__/customConfig.test.js index 24399bb43..f0c32aa93 100644 --- a/__tests__/customConfig.test.js +++ b/__tests__/customConfig.test.js @@ -29,3 +29,35 @@ test('it uses the values from the custom config file', () => { expect(result.css).toMatchCss(expected) }) }) + +test('custom config can be passed as an object', () => { + return postcss([tailwind({ + screens: { + mobile: '400px', + }, + })]) + .process( + ` + @responsive { + .foo { + color: blue; + } + } + `, + { from: undefined } + ) + .then(result => { + const expected = ` + .foo { + color: blue; + } + @media (min-width: 400px) { + .mobile\\:foo { + color: blue; + } + } + ` + + expect(result.css).toMatchCss(expected) + }) +})