Skip to content

Commit

Permalink
Refactor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze committed Apr 7, 2017
1 parent 5b4f4dc commit ca8eef1
Show file tree
Hide file tree
Showing 16 changed files with 227 additions and 250 deletions.
2 changes: 1 addition & 1 deletion __tests__/components/App_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ describe "App" (fun _ => {
let state = Store.init;
let tree = App.createElement ::state ::dispatch children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/ButtonGroup_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ describe "ButtonGroup" (fun _ => {
let children = [ <div>(ReactRe.stringToElement "child")</div>, <span /> ];
let tree = ButtonGroup.createElement ::children () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/Buttons_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ describe "Buttons" (fun _ => {
let dispatch = fun _ => ();
let tree = Buttons.createElement ::dispatch children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/Calculator_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ describe "Calculator" (fun _ => {
let children = [ <div>(ReactRe.stringToElement "child")</div>, <span /> ];
let tree = Calculator.createElement ::children () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/Checkmark_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ describe "Checkmark" (fun _ => {
test "renders" (fun _ => {
let tree = Checkmark.createElement children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/ClearButton_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ describe "ClearButton" (fun _ => {
let dispatch = fun _ => ();
let tree = ClearButton.createElement ::dispatch children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/Display_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ describe "Display" (fun _ => {
let output = "42";
let tree = Display.createElement ::output children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
4 changes: 2 additions & 2 deletions __tests__/components/Feature_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ describe "Feature" (fun _ => {
let text = "A feature";
let tree = Feature.createElement ::emoji ::text children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot
expect tree |> toMatchSnapshot
});

test "renders soon emoji" (fun _ => {
let emoji = Feature.Feature.Soon;
let text = "A feature";
let tree = Feature.createElement ::emoji ::text children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/Features_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ describe "Features" (fun _ => {
test "renders" (fun _ => {
let tree = Features.createElement children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/Hero_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ describe "Hero" (fun _ => {
test "renders" (fun _ => {
let tree = Hero.createElement children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
4 changes: 2 additions & 2 deletions __tests__/components/OperationButton_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe "OperationButton" (fun _ => {
let dispatch = fun _ => ();
let tree = OperationButton.createElement ::action ::dispatch children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});

test "renders a class name" (fun _ => {
Expand All @@ -19,6 +19,6 @@ describe "OperationButton" (fun _ => {
let tree = OperationButton.createElement ::action ::className ::dispatch children::[] ()
|> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/Soon_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ describe "Soon" (fun _ => {
test "renders" (fun _ => {
let tree = Soon.createElement children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/Svg_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ describe "Svg" (fun _ => {
let children = [ <g />, <path /> ];
let tree = Svg.createElement ::children () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
2 changes: 1 addition & 1 deletion __tests__/components/Title_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ describe "Title" (fun _ => {
test "renders" (fun _ => {
let tree = Title.createElement children::[] () |> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
4 changes: 2 additions & 2 deletions __tests__/components/ValueButton_test.re
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe "ValueButton" (fun _ => {
let tree = ValueButton.createElement ::dispatch ::value children::[] ()
|> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});

test "renders expanded button" (fun _ => {
Expand All @@ -20,6 +20,6 @@ describe "ValueButton" (fun _ => {
let tree = ValueButton.createElement ::dispatch ::expand ::value children::[] ()
|> Renderer.render;

(expect tree) |> toMatchSnapshot;
expect tree |> toMatchSnapshot;
});
});
Loading

0 comments on commit ca8eef1

Please sign in to comment.