Skip to content

Commit

Permalink
[Box] Use the default theme (#15019)
Browse files Browse the repository at this point in the history
  • Loading branch information
apanizo authored and oliviertassinari committed Mar 23, 2019
1 parent 384787f commit 894a13a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/material-ui/src/Box/Box.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
29 changes: 29 additions & 0 deletions packages/material-ui/src/Box/Box.test.js
Original file line number Diff line number Diff line change
@@ -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('<Box />', () => {
let mount;

before(() => {
mount = createMount();
});

after(() => {
mount.cleanUp();
});

const testChildren = <div className="unique">Hello World</div>;

it('renders children and box content', () => {
const wrapper = mount(
<Box component="span" m={1}>
{testChildren}
</Box>,
);

assert.strictEqual(wrapper.contains(testChildren), true);
assert.strictEqual(wrapper.find('span').length, 1);
});
});

0 comments on commit 894a13a

Please sign in to comment.