From cfb676acd77cebdca9dbda9c00ad2472adc8bf75 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Tue, 13 Mar 2018 14:07:05 -0400 Subject: [PATCH] Test that container screens can just be an array --- __tests__/containerPlugin.test.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/__tests__/containerPlugin.test.js b/__tests__/containerPlugin.test.js index ef7ac669f..e7ebdb337 100644 --- a/__tests__/containerPlugin.test.js +++ b/__tests__/containerPlugin.test.js @@ -70,6 +70,29 @@ test('screens can be specified explicitly', () => { `) }) +test('screens can be an array', () => { + const [components] = processPluginsWithValidConfig({ + plugins: [ + container({ + screens: [ + '400px', + '500px', + ], + }), + ], + }) + + expect(css(components)).toMatchCss(` + .container { width: 100% } + @media (min-width: 400px) { + .container { max-width: 400px } + } + @media (min-width: 500px) { + .container { max-width: 500px } + } + `) +}) + test('the container can be centered by default', () => { const [components] = processPluginsWithValidConfig({ plugins: [