From 894a13af98ea84afe11defb5015eb8ed278c0dd8 Mon Sep 17 00:00:00 2001 From: Adolfo Panizo Date: Sat, 23 Mar 2019 22:15:46 +0100 Subject: [PATCH] [Box] Use the default theme (#15019) --- packages/material-ui/src/Box/Box.js | 2 +- packages/material-ui/src/Box/Box.test.js | 29 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 packages/material-ui/src/Box/Box.test.js diff --git a/packages/material-ui/src/Box/Box.js b/packages/material-ui/src/Box/Box.js index 2fe7975be3adcf..62d4fd7a1b8def 100644 --- a/packages/material-ui/src/Box/Box.js +++ b/packages/material-ui/src/Box/Box.js @@ -9,7 +9,7 @@ import sizing from '@material-ui/system/sizing'; import spacing from '@material-ui/system/spacing'; import typography from '@material-ui/system/typography'; import css from '@material-ui/system/css'; -import { styled } from '@material-ui/styles'; +import styled from '../styles/styled'; export const styleFunction = css( compose( diff --git a/packages/material-ui/src/Box/Box.test.js b/packages/material-ui/src/Box/Box.test.js new file mode 100644 index 00000000000000..c675885fccc827 --- /dev/null +++ b/packages/material-ui/src/Box/Box.test.js @@ -0,0 +1,29 @@ +import React from 'react'; +import { assert } from 'chai'; +import { createMount } from '@material-ui/core/test-utils'; +import Box from './Box'; + +describe('', () => { + let mount; + + before(() => { + mount = createMount(); + }); + + after(() => { + mount.cleanUp(); + }); + + const testChildren =
Hello World
; + + it('renders children and box content', () => { + const wrapper = mount( + + {testChildren} + , + ); + + assert.strictEqual(wrapper.contains(testChildren), true); + assert.strictEqual(wrapper.find('span').length, 1); + }); +});