git.iko.soy/rowtype-yoga/ry-starter-spa
on main help sign in
Modify spec to work with emotionjs
commitc420181f580703fbf5f9b65b211a43ccddb381ef authorMark Eibes <mark.eibes@gmail.com> dateSat 25 Jul 2020, 11:14 (6 years ago) parentcc27a6c
2 files changed+12−12
package.json+1 src/Components/Example/Spec.purs+11−12
package.json+1
@@ -26,6 +26,7 @@
2626 "scripts": {
2727 "clean": "rimraf node_modules output dce-output .spago dist/* *.lock dist",
2828 "postinstall": "spago install",
29+ "pretest": "spago build",
2930 "test": "spago test",
3031 "prestart": "spago build",
3132 "start": "webpack-dev-server --open --config webpack.dev.js",
src/Components/Example/Spec.purs+11−12
@@ -5,15 +5,14 @@ import Components.Example as Example
55
66spec ∷ Spec Unit
77spec =
8− after_ cleanup
9− $ describe "A simple counter" do
10− it "renders without errors" do
11− { findByText } <- renderComponent Example.component { initialValue: 0 }
12− elem <- findByText "Increment: 0"
13− elem `textContentShouldEqual` "Increment: 0"
14− it "increments when clicked" do
15− { findByText } <- renderComponent Example.component { initialValue: 3 }
16− elem <- findByText "Increment: 3"
17− elem `textContentShouldEqual` "Increment: 3"
18− fireEventClick elem
19− elem `textContentShouldEqual` "Increment: 4"
8+ after_ cleanup do
9+ describe "A simple counter" do
10+ it "renders without errors" do
11+ { findByText } <- renderComponent Example.component { initialValue: 0 }
12+ elem <- findByText "Increment: 0"
13+ elem `textContentShouldEqual` "Increment: 0"
14+ it "increments when clicked" do
15+ { findByText } <- renderComponent Example.component { initialValue: 3 }
16+ elem <- findByText "Increment: 3"
17+ fireEventClick elem
18+ void $ findByText "Increment: 4"