-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
2,322 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
sudo: false | ||
|
||
language: node_js | ||
|
||
node_js: | ||
- 7 | ||
- 6 | ||
- 4 | ||
|
||
cache: | ||
directories: | ||
- $HOME/.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "App" (fun _ => { | ||
test "renders" (fun _ => { | ||
let dispatch = fun _ => (); | ||
let state = Store.init; | ||
let tree = App.createElement ::state ::dispatch children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "ButtonGroup" (fun _ => { | ||
test "renders" (fun _ => { | ||
let children = [ <div>(ReactRe.stringToElement "child")</div>, <span /> ]; | ||
let tree = ButtonGroup.createElement ::children () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Buttons" (fun _ => { | ||
test "renders" (fun _ => { | ||
let dispatch = fun _ => (); | ||
let tree = Buttons.createElement ::dispatch children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Calculator" (fun _ => { | ||
test "renders" (fun _ => { | ||
let children = [ <div>(ReactRe.stringToElement "child")</div>, <span /> ]; | ||
let tree = Calculator.createElement ::children () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Checkmark" (fun _ => { | ||
test "renders" (fun _ => { | ||
let tree = Checkmark.createElement children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "ClearButton" (fun _ => { | ||
test "renders" (fun _ => { | ||
let dispatch = fun _ => (); | ||
let tree = ClearButton.createElement ::dispatch children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Display" (fun _ => { | ||
test "renders" (fun _ => { | ||
let output = "42"; | ||
let tree = Display.createElement ::output children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Feature" (fun _ => { | ||
test "renders checkmark emoji" (fun _ => { | ||
let emoji = Feature.Feature.Checkmark; | ||
let text = "A feature"; | ||
let tree = Feature.createElement ::emoji ::text children::[] () |> Renderer.render; | ||
|
||
(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; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Features" (fun _ => { | ||
test "renders" (fun _ => { | ||
let tree = Features.createElement children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Hero" (fun _ => { | ||
test "renders" (fun _ => { | ||
let tree = Hero.createElement children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "OperationButton" (fun _ => { | ||
test "renders" (fun _ => { | ||
let action = Action.Add; | ||
let dispatch = fun _ => (); | ||
let tree = OperationButton.createElement ::action ::dispatch children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
|
||
test "renders a class name" (fun _ => { | ||
let action = Action.Add; | ||
let className = Styles.make color::"rebeccapurple" () |> Styles.className; | ||
let dispatch = fun _ => (); | ||
let tree = OperationButton.createElement ::action ::className ::dispatch children::[] () | ||
|> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Soon" (fun _ => { | ||
test "renders" (fun _ => { | ||
let tree = Soon.createElement children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Svg" (fun _ => { | ||
test "renders" (fun _ => { | ||
let children = [ <g />, <path /> ]; | ||
let tree = Svg.createElement ::children () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "Title" (fun _ => { | ||
test "renders" (fun _ => { | ||
let tree = Title.createElement children::[] () |> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
open Jest; | ||
open Expect; | ||
|
||
let _ = | ||
|
||
describe "ValueButton" (fun _ => { | ||
test "renders" (fun _ => { | ||
let dispatch = fun _ => (); | ||
let value = "1"; | ||
let tree = ValueButton.createElement ::dispatch ::value children::[] () | ||
|> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
|
||
test "renders expanded button" (fun _ => { | ||
let dispatch = fun _ => (); | ||
let expand = true; | ||
let value = "1"; | ||
let tree = ValueButton.createElement ::dispatch ::expand ::value children::[] () | ||
|> Renderer.render; | ||
|
||
(expect tree) |> toMatchSnapshot; | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`App renders 1`] = ` | ||
<main | ||
className={ | ||
Object { | ||
"data-css-hzy630": "", | ||
} | ||
} | ||
> | ||
<Hero | ||
reasonProps={0} | ||
/> | ||
<Calculator | ||
reasonProps={ | ||
Array [ | ||
Array [ | ||
<Display | ||
reasonProps={ | ||
Array [ | ||
"0", | ||
] | ||
} | ||
/>, | ||
Array [ | ||
<Buttons | ||
reasonProps={ | ||
Array [ | ||
[Function], | ||
] | ||
} | ||
/>, | ||
0, | ||
], | ||
], | ||
] | ||
} | ||
> | ||
<Display | ||
reasonProps={ | ||
Array [ | ||
"0", | ||
] | ||
} | ||
/> | ||
<Buttons | ||
reasonProps={ | ||
Array [ | ||
[Function], | ||
] | ||
} | ||
/> | ||
</Calculator> | ||
</main> | ||
`; |
16 changes: 16 additions & 0 deletions
16
__tests__/components/__snapshots__/buttonGroup_test.js.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ButtonGroup renders 1`] = ` | ||
<div | ||
className={ | ||
Object { | ||
"data-css-1cqgl9p": "", | ||
} | ||
} | ||
> | ||
<div> | ||
child | ||
</div> | ||
<span /> | ||
</div> | ||
`; |
Oops, something went wrong.