UNPKG

2.68 kBHTMLView Raw
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="utf-8" />
5 <title>Terminal 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/terminal_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.TerminalReporter({
15 verbosity: 3,
16 color: true,
17 showStack: true
18 }));
19 </script>
20</head>
21<body>
22 <script type="text/javascript">
23 describe("Some base suite", function() {
24 describe("Basic Suite", function() {
25 it("Should pass a basic truthiness test.", function() {
26 expect(true).toEqual(true);
27 expect(false).toEqual(false);
28 });
29 it("Should fail when it hits an inequal statement.", function() {
30 expect(1+1).toEqual(3);
31 });
32 });
33
34 xdescribe("A skipped suite", function() {
35 it("Should not be reported.", function() {
36 expect(0).toEqual(0);
37 });
38 it("Should still add to the skipped count", function() {
39 expect(0).toEqual(0);
40 });
41 });
42 describe("A suite with a skipped suite", function() {
43 describe("A suite with a skipped test", function() {
44 xit("Should be executed but skipped.", function() {
45 expect(0).toEqual(0);
46 });
47 it("Should not be skipped.", function() {
48 expect(0).toEqual(0);
49 });
50 });
51 xdescribe("A nested skipped suite", function() {
52 it("Should not be reported.", function() {
53 expect(0).toEqual(0);
54 });
55 it("Should still add to the skipped count", function() {
56 expect(0).toEqual(0);
57 });
58 });
59 });
60 });
61 describe("Another Suite", function() {
62 it("Should pass this test as well.", function() {
63 expect(0).toEqual(0);
64 });
65 });
66 </script>
67</body>
68</html>