UNPKG

2.66 kBHTMLView Raw
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="utf-8" />
5 <title>JUnit XML Reporter Spec</title>
6
7 <link rel="stylesheet" href="../node_modules/jasmine-core/lib/jasmine-core/jasmine.css" type="text/css" />
8 <script type="text/javascript" src="../node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script>
9 <script type="text/javascript" src="../node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script>
10
11 <script type="text/javascript" src="../src/junit_reporter.js"></script>
12 <script type="text/javascript" src="../node_modules/jasmine-core/lib/jasmine-core/boot.js"></script>
13 <script>
14 jasmine.getEnv().addReporter(new jasmineReporters.JUnitXmlReporter({
15 savePath: '..',
16 consolidateAll: false
17 }));
18 </script>
19</head>
20<body>
21 <script type="text/javascript">
22 describe("Some base suite", function() {
23 describe("Basic Suite", function() {
24 it("Should pass a basic truthiness test.", function() {
25 expect(true).toEqual(true);
26 expect(false).toEqual(false);
27 });
28 it("Should fail when it hits an inequal statement.", function() {
29 expect(1+1).toEqual(3);
30 });
31 });
32
33 xdescribe("A skipped suite", function() {
34 it("Should not be reported.", function() {
35 expect(0).toEqual(0);
36 });
37 it("Should still add to the skipped count", function() {
38 expect(0).toEqual(0);
39 });
40 });
41 describe("A suite with a skipped suite", function() {
42 describe("A suite with a skipped test", function() {
43 xit("Should be executed but skipped.", function() {
44 expect(0).toEqual(0);
45 });
46 it("Should not be skipped.", function() {
47 expect(0).toEqual(0);
48 });
49 });
50 xdescribe("A nested skipped suite", function() {
51 it("Should not be reported.", function() {
52 expect(0).toEqual(0);
53 });
54 it("Should still add to the skipped count", function() {
55 expect(0).toEqual(0);
56 });
57 });
58 });
59 });
60 describe("Another Suite", function() {
61 it("Should pass this test as well.", function() {
62 expect(0).toEqual(0);
63 });
64 });
65 </script>
66</body>
67</html>