Skip to content

Commit

Permalink
remove qualified imports
Browse files Browse the repository at this point in the history
  • Loading branch information
pb99u069 committed Nov 29, 2022
1 parent 1064632 commit cead3ef
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions templates/ctl-scaffold/test/Main.purs
Expand Up @@ -4,38 +4,43 @@ module Test.Scaffold.Main (main) where

import Contract.Prelude

import Contract.Config as Contract.Config
import Contract.Monad as Contract.Monad
import Contract.Test.Mote as Contract.Test.Mote
import Contract.Test.Plutip (PlutipTest, testPlutipContracts)
import Contract.Test.Plutip as Contract.Test.Plutip
import Contract.Config (emptyHooks)
import Contract.Monad (launchAff_)
import Contract.Test.Mote (TestPlanM, interpretWithConfig)
import Contract.Test.Plutip
( InitialUTxOs
, PlutipConfig
, PlutipTest
, testPlutipContracts
, withWallets
)
import Data.BigInt as BigInt
import Data.UInt as UInt
import Effect.Aff (Milliseconds(Milliseconds))
import Mote (test)
import Scaffold as Scaffold
import Scaffold (contract)
import Test.Spec.Runner (defaultConfig)

-- Run with `npm run test`
main :: Effect Unit
main = Contract.Monad.launchAff_ $ do
Contract.Test.Mote.interpretWithConfig
main = launchAff_ $ do
interpretWithConfig
defaultConfig { timeout = Just $ Milliseconds 70_000.0, exit = true } $
testPlutipContracts config suite

suite :: Contract.Test.Mote.TestPlanM PlutipTest Unit
suite :: TestPlanM PlutipTest Unit
suite = do
test "Print PubKey" do
let
distribution :: Contract.Test.Plutip.InitialUTxOs
distribution :: InitialUTxOs
distribution =
[ BigInt.fromInt 5_000_000
, BigInt.fromInt 2_000_000_000
]
Contract.Test.Plutip.withWallets distribution \_ -> do
Scaffold.contract
withWallets distribution \_ -> do
contract

config :: Contract.Test.Plutip.PlutipConfig
config :: PlutipConfig
config =
{ host: "127.0.0.1"
, port: UInt.fromInt 8082
Expand Down Expand Up @@ -73,5 +78,5 @@ config =
}
, customLogger: Nothing
, suppressLogs: true
, hooks: Contract.Config.emptyHooks
, hooks: emptyHooks
}

0 comments on commit cead3ef

Please sign in to comment.