Migrate to Purescript 12
This commit is contained in:
@@ -2,13 +2,10 @@ module Test.Cheerio where
|
||||
|
||||
import Prelude hiding (eq)
|
||||
|
||||
import Control.Monad.Eff (Eff)
|
||||
import Control.Monad.Eff.AVar (AVAR)
|
||||
import Control.Monad.Eff.Console (CONSOLE)
|
||||
import Effect (Effect)
|
||||
import Data.Maybe (Maybe(..))
|
||||
import Test.Unit (TestSuite, suite, test)
|
||||
import Test.Unit.Assert as Assert
|
||||
import Test.Unit.Console (TESTOUTPUT)
|
||||
import Test.Unit.Main (runTest)
|
||||
|
||||
import Cheerio
|
||||
@@ -32,10 +29,10 @@ import Cheerio.Static (loadRoot)
|
||||
|
||||
import Test.HtmlEx (htmlEx)
|
||||
|
||||
main :: Eff (avar :: AVAR, console :: CONSOLE, testOutput :: TESTOUTPUT) Unit
|
||||
main :: Effect Unit
|
||||
main = runTest suites
|
||||
|
||||
suites :: forall eff. TestSuite eff
|
||||
suites :: TestSuite
|
||||
suites = do
|
||||
suite "Attributes" do
|
||||
test "attr" do
|
||||
|
||||
@@ -2,13 +2,10 @@ module Test.Cheerio.Static where
|
||||
|
||||
import Prelude hiding (eq)
|
||||
|
||||
import Control.Monad.Eff (Eff)
|
||||
import Control.Monad.Eff.AVar (AVAR)
|
||||
import Control.Monad.Eff.Console (CONSOLE)
|
||||
import Effect (Effect)
|
||||
import Data.Maybe (Maybe(..))
|
||||
import Test.Unit (TestSuite, suite, test)
|
||||
import Test.Unit.Assert as Assert
|
||||
import Test.Unit.Console (TESTOUTPUT)
|
||||
import Test.Unit.Main (runTest)
|
||||
|
||||
import Cheerio (attr, find, length, text)
|
||||
@@ -24,10 +21,10 @@ import Cheerio.Static
|
||||
|
||||
import Test.HtmlEx (htmlEx)
|
||||
|
||||
main :: Eff (avar :: AVAR, console :: CONSOLE, testOutput :: TESTOUTPUT) Unit
|
||||
main :: Effect Unit
|
||||
main = runTest suites
|
||||
|
||||
suites :: forall eff. TestSuite eff
|
||||
suites :: TestSuite
|
||||
suites = do
|
||||
suite "Loading" do
|
||||
test "load" do
|
||||
@@ -50,4 +47,4 @@ suites = do
|
||||
test "html" do
|
||||
Assert.equal
|
||||
(Just """<li class="apple">Apple</li>""")
|
||||
(loadRoot htmlEx # find ".apple" # html)
|
||||
(loadRoot htmlEx # find ".apple" # html)
|
||||
|
||||
@@ -2,20 +2,17 @@ module Test.Main where
|
||||
|
||||
import Prelude hiding (eq)
|
||||
|
||||
import Control.Monad.Eff (Eff)
|
||||
import Control.Monad.Eff.AVar (AVAR)
|
||||
import Control.Monad.Eff.Console (CONSOLE)
|
||||
import Effect (Effect)
|
||||
import Test.Unit (TestSuite)
|
||||
import Test.Unit.Console (TESTOUTPUT)
|
||||
import Test.Unit.Main (runTest)
|
||||
|
||||
import Test.Cheerio as C
|
||||
import Test.Cheerio.Static as CS
|
||||
|
||||
main :: Eff (avar :: AVAR, console :: CONSOLE, testOutput :: TESTOUTPUT) Unit
|
||||
main :: Effect Unit
|
||||
main = runTest suites
|
||||
|
||||
suites :: forall eff. TestSuite eff
|
||||
suites :: TestSuite
|
||||
suites = do
|
||||
C.suites
|
||||
CS.suites
|
||||
CS.suites
|
||||
|
||||
Reference in New Issue
Block a user