-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate new UCAN on CLI retry (#553)
- Loading branch information
Showing
6 changed files
with
96 additions
and
30 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
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
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,9 @@ | ||
module Fission.Test.CLI where | ||
|
||
import Fission.Test.CLI.Prelude | ||
|
||
spec :: Spec | ||
spec = | ||
describe "Fission.CLI" do | ||
it "runs at all" do | ||
1 `shouldNotBe` 2 |
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,32 @@ | ||
module Fission.Test.CLI.Prelude | ||
( module Fission.Prelude | ||
-- | ||
, module Test.Tasty | ||
, module Test.Tasty.Hspec | ||
, module Test.QuickCheck | ||
-- | ||
, itsProp' | ||
, shouldHaveRun | ||
) where | ||
|
||
import Test.Tasty (TestTree, defaultMain, testGroup) | ||
import Test.Tasty.Hspec | ||
|
||
import Test.QuickCheck hiding (Result (..)) | ||
import Test.QuickCheck.Instances () | ||
|
||
import Fission.Prelude hiding (Result (..), log) | ||
|
||
-- | Prop test with the default number of tries (100) | ||
itsProp' :: (HasCallStack, Testable a) => String -> a -> SpecWith () | ||
itsProp' description prop = it ("🔀 " <> description) $ property prop | ||
|
||
shouldHaveRun :: | ||
( Eq (OpenUnion logs) | ||
, Show (OpenUnion logs) | ||
, IsMember eff logs | ||
) | ||
=> [OpenUnion logs] | ||
-> eff | ||
-> Expectation | ||
shouldHaveRun effLog eff = effLog `shouldContain` [openUnionLift eff] |
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,9 @@ | ||
module Main (main) where | ||
|
||
import qualified Fission.Test.CLI as CLI | ||
import Fission.Test.CLI.Prelude | ||
|
||
main :: IO () | ||
main = do | ||
spec <- testSpecs $ parallel CLI.spec | ||
defaultMain $ testGroup "Tests" spec |
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