mirror of
https://github.com/github/semantic.git
synced 2025-01-06 23:46:21 +03:00
Test annotatedSummaries
This commit is contained in:
parent
ac36cf5bcc
commit
78bb7779a4
@ -39,9 +39,9 @@ spec = parallel $ do
|
|||||||
diffSummary testDiff `shouldBe` [ DiffSummary { patch = Insert (LeafInfo "string" "a"), parentAnnotations = [ ArrayLiteral ] } ]
|
diffSummary testDiff `shouldBe` [ DiffSummary { patch = Insert (LeafInfo "string" "a"), parentAnnotations = [ ArrayLiteral ] } ]
|
||||||
describe "show" $ do
|
describe "show" $ do
|
||||||
it "should print adds" $
|
it "should print adds" $
|
||||||
show (pretty testSummary) `shouldBe` ("Added the 'a' string" :: Text)
|
annotatedSummaries testSummary `shouldBe` ["Added the 'a' string"]
|
||||||
it "prints a replacement" $ do
|
it "prints a replacement" $ do
|
||||||
show (pretty replacementSummary) `shouldBe` ("Replaced the 'a' string with the 'b' symbol in the array context" :: Text)
|
annotatedSummaries replacementSummary `shouldBe` ["Replaced the 'a' string with the 'b' symbol in the array context"]
|
||||||
describe "DiffInfo" $ do
|
describe "DiffInfo" $ do
|
||||||
prop "patches in summaries match the patches in diffs" $
|
prop "patches in summaries match the patches in diffs" $
|
||||||
\a -> let
|
\a -> let
|
||||||
|
Loading…
Reference in New Issue
Block a user