mirror of
https://github.com/wasp-lang/wasp.git
synced 2024-09-11 07:16:09 +03:00
* Improved Wasp AI CLI experience. * fix * Added CLI Usage, polished CLI commands. * Added choice of temperature. * Added styling. * Added more sophisticated, terminal-only styling. * fix * Updated Mage to use new Wasp CLI + added some messaging to CLI. * fix * Created wasp-ai/README, updated waspc/README. * Moved wasp-ai/ to mage/. * Final polishing (docs, readmes, messaging). * fix * Added tests for LogMsg. * Updated versions of test apps to 0.12. * fix * fix * Update mage/README.md * fix * fix
22 lines
871 B
Haskell
22 lines
871 B
Haskell
module AI.GenerateNewProject.LogMsgTest where
|
|
|
|
import Test.Tasty.Hspec
|
|
import Wasp.AI.GenerateNewProject.LogMsg
|
|
import qualified Wasp.Util.Terminal as Term
|
|
|
|
spec_Wasp_AI_GenerateNewProject_LogMsg :: Spec
|
|
spec_Wasp_AI_GenerateNewProject_LogMsg = do
|
|
it "Concatenation" $ do
|
|
toPlainString ("foo" <> "bar") `shouldBe` toPlainString "foobar"
|
|
toPlainString ("foo" <> "bar") <> "buzz" `shouldBe` toPlainString "foobarbuzz"
|
|
toPlainString "foo " <> (" bar" <> " buzz") `shouldBe` toPlainString "foo bar buzz"
|
|
|
|
it "Styling" $ do
|
|
let styledMsg = styled Important "foo" <> " bar" <> styled Error "buzz"
|
|
toPlainString styledMsg `shouldBe` "foo barbuzz"
|
|
toTermString styledMsg
|
|
`shouldBe` ( Term.applyStyles [Term.Bold, Term.Magenta] "foo"
|
|
<> " bar"
|
|
<> Term.applyStyles [Term.Red] "buzz"
|
|
)
|