File tree Expand file tree Collapse file tree 5 files changed +30
-2
lines changed Expand file tree Collapse file tree 5 files changed +30
-2
lines changed Original file line number Diff line number Diff line change 5151
5252 - name : Build the project
5353 run : npm run build
54+
55+ - name : Test the project
56+ run : npm run test
Original file line number Diff line number Diff line change 3131 "build" : " run-s build:*" ,
3232 "build:spago" : " spago build" ,
3333 "build:pulp" : " pulp build -o output-pulp" ,
34- "clean" : " rm -rf .spago bower_components output output-pulp node_modules .pulp-cache .psci_modules"
34+ "clean" : " rm -rf .spago bower_components output output-pulp node_modules .pulp-cache .psci_modules" ,
35+ "test" : " spago -x test.dhall test"
3536 }
3637}
Original file line number Diff line number Diff line change 1- import ReactDOMServer from "react-dom/server" ;
1+ import ReactDOMServer from "react-dom/server.js " ;
22export var renderToString = ReactDOMServer . renderToString ;
33export var renderToStaticMarkup = ReactDOMServer . renderToStaticMarkup ;
Original file line number Diff line number Diff line change 1+ let conf = ./ spago. dhall
2+
3+ in conf // {
4+ sources = conf. sources # [ " test/**/*.purs" ],
5+ dependencies = conf. dependencies # [ " effect" , " spec" , " aff" ]
6+ }
Original file line number Diff line number Diff line change 1+ module Test.Main where
2+
3+ import Prelude
4+
5+ import Effect (Effect )
6+ import Effect.Aff (launchAff_ )
7+ import React.Basic.DOM.Server (renderToString )
8+ import Test.Spec (describe , it )
9+ import Test.Spec.Assertions (shouldEqual )
10+ import Test.Spec.Reporter.Console (consoleReporter )
11+ import Test.Spec.Runner (runSpec )
12+
13+ main :: Effect Unit
14+ main = launchAff_ $ runSpec [consoleReporter] do
15+ describe " react-basic-dom-spec" do
16+ describe " react-basic-dom-server" do
17+ it " imports properly" do
18+ renderToString mempty `shouldEqual` " "
You can’t perform that action at this time.
0 commit comments