Skip to content

Commit

Permalink
Add test for junit reporter skipped message
Browse files Browse the repository at this point in the history
  • Loading branch information
Will Martin authored and williammartin committed Jun 18, 2020
1 parent 4fcfb02 commit 749dbe7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reporters/junit_reporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ var _ = Describe("JUnit Reporter", func() {
ComponentTexts: []string{"[Top Level]", "A", "B", "C"},
State: specStateCase,
RunTime: 5 * time.Second,
Failure: types.SpecFailure{
Message: "skipped reason",
},
}
reporter.SpecWillRun(spec)
reporter.SpecDidComplete(spec)
Expand All @@ -325,7 +328,7 @@ var _ = Describe("JUnit Reporter", func() {
Expect(output.Time).To(Equal(reportedSuiteTime))
Expect(output.Errors).To(Equal(0))
Expect(output.TestCases[0].Name).To(Equal("A B C"))
Expect(output.TestCases[0].Skipped).ToNot(BeNil())
Expect(output.TestCases[0].Skipped.Message).To(ContainSubstring("skipped reason"))
})
})
}
Expand Down

0 comments on commit 749dbe7

Please sign in to comment.