Skip to content

Commit

Permalink
Update snapshot and package json test command
Browse files Browse the repository at this point in the history
  • Loading branch information
cksharma11 committed Sep 1, 2019
1 parent 6c83ed8 commit f8bff44
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"test": "react-scripts test components",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`ColorBox should render properly 1`] = `
"<ClipboardButton data-clipboard-text=\\"#bbb\\" style={{...}} onClick={[Function: onClick]}>
<div id=\\"#bbb\\" className=\\"div-colorbox\\" style={{...}} onClick={[Function: setCopySucess]}>
#bbb
</div>
"<ClipboardButton data-clipboard-text={[undefined]} style={{...}} onClick={[Function: onClick]}>
<div id={[undefined]} className=\\"div-colorbox\\" style={{...}} onClick={[Function: setCopySuccess]} />
</ClipboardButton>"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ Enzyme.configure({ adapter: new Adapter() });

describe("ColorBoxContainer", () => {
it("should render properly", () => {
const wrapper = shallow(<ColorBoxContainer colors={['red', 'green']} />);
const wrapper = shallow(<ColorBoxContainer colors={[
{ colorName: "Summer Sky", colorCode: "#3498DB" },
{ colorName: "Steel Blue", colorCode: "#487EB0" }
]} />);
expect(wrapper.debug()).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`ColorBoxContainer should render properly 1`] = `
"<div className=\\"div-color-container\\">
<ColorBox haxCode=\\"red\\" />
<ColorBox haxCode=\\"green\\" />
<ColorBox hexCode=\\"#3498DB\\" colorName=\\"Summer Sky\\" />
<ColorBox hexCode=\\"#487EB0\\" colorName=\\"Steel Blue\\" />
</div>"
`;

0 comments on commit f8bff44

Please sign in to comment.